From 83e666c6a10841738b1bf20db7eb37c11772ec1e Mon Sep 17 00:00:00 2001
From: Puiching_Memory <1138663075@qq.com>
Date: Sat, 12 Mar 2022 15:02:33 +0800
Subject: [PATCH] Update 0312
---
GUI.py | 64 ++---
GUI_About.py | 2 +-
GUI_SSC.py | 285 ++++++++++-----------
M_About.py | 2 +
M_Draw.py | 11 +-
M_Roll.py | 2 +
M_SSC.py | 177 ++++++-------
Main.py | 637 +++++++++++++++++++++++------------------------
Plug_in.py | 5 +-
Preparation.py | 4 +
T_Test.py | 209 +++++++++-------
T_package_exe.py | 2 +-
nodegraph.py | 27 ++
nodes.py | 179 +++++++++++++
14 files changed, 913 insertions(+), 693 deletions(-)
create mode 100644 nodegraph.py
create mode 100644 nodes.py
diff --git a/GUI.py b/GUI.py
index 534758d..5fa9ea8 100644
--- a/GUI.py
+++ b/GUI.py
@@ -115,61 +115,64 @@ def __init__( self, parent ):
wSizer_L2 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
- self.G1 = wx.Button( self, wx.ID_ANY, u"语文 3", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G1 = wx.Button( self, wx.ID_ANY, u"语文 3", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G1.SetFont( wx.Font( 9, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.G1.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G1, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G1, 0, 0, 0 )
- self.G2 = wx.Button( self, wx.ID_ANY, u"数学 4", wx.DefaultPosition, wx.DefaultSize, wx.BORDER_NONE )
+ self.G2 = wx.Button( self, wx.ID_ANY, u"数学 4", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G2.SetFont( wx.Font( 9, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
self.G2.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G2, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G2, 0, 0, 2 )
- self.G3 = wx.Button( self, wx.ID_ANY, u"英语 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G3 = wx.Button( self, wx.ID_ANY, u"英语 1", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G3.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G3, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G3, 0, 0, 2 )
- self.G4 = wx.Button( self, wx.ID_ANY, u"信息 4", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G4 = wx.Button( self, wx.ID_ANY, u"信息 4", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G4.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G4, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G4, 0, 0, 2 )
- self.G5 = wx.Button( self, wx.ID_ANY, u"历史 2", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G5 = wx.Button( self, wx.ID_ANY, u"历史 2", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G5.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G5, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G5, 0, 0, 2 )
- self.G6 = wx.Button( self, wx.ID_ANY, u"地理 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G6 = wx.Button( self, wx.ID_ANY, u"地理 1", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G6.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G6, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G6, 0, 0, 2 )
- self.G7 = wx.Button( self, wx.ID_ANY, u"物理 3", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G7 = wx.Button( self, wx.ID_ANY, u"物理 3", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G7.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G7, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G7, 0, 0, 2 )
- self.G8 = wx.Button( self, wx.ID_ANY, u"化学 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G8 = wx.Button( self, wx.ID_ANY, u"化学 1", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G8.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G8, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G8, 0, 0, 2 )
- self.G9 = wx.Button( self, wx.ID_ANY, u"生物 1", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G9 = wx.Button( self, wx.ID_ANY, u"生物 1", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G9.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G9, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G9, 0, 0, 2 )
- self.G10 = wx.Button( self, wx.ID_ANY, u"通用 4", wx.DefaultPosition, wx.Size( 70,-1 ), wx.BORDER_NONE )
+ self.G10 = wx.Button( self, wx.ID_ANY, u"通用 4", wx.DefaultPosition, wx.Size( 74,-1 ), wx.BORDER_NONE )
self.G10.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
- wSizer_L2.Add( self.G10, 0, wx.RIGHT|wx.LEFT, 2 )
+ wSizer_L2.Add( self.G10, 0, 0, 2 )
bSizer_main.Add( wSizer_L2, 0, wx.ALIGN_CENTER_HORIZONTAL, 0 )
+ self.m_staticline4 = wx.StaticLine( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+ bSizer_main.Add( self.m_staticline4, 0, wx.EXPAND, 5 )
+
wSizer_C = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
bSizer18 = wx.BoxSizer( wx.VERTICAL )
@@ -564,17 +567,14 @@ def __init__( self, parent ):
self.Plug_in_box = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.Size( 200,70 ), Plug_in_boxChoices, 0 )
bSizer181.Add( self.Plug_in_box, 0, wx.ALL, 5 )
- self.CMD_OUT = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 200,170 ), wx.TE_MULTILINE|wx.TE_READONLY )
- bSizer181.Add( self.CMD_OUT, 0, wx.ALL, 5 )
+ self.CMD_OUT = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 200,180 ), wx.TE_MULTILINE|wx.TE_READONLY )
+ bSizer181.Add( self.CMD_OUT, 0, wx.TOP|wx.RIGHT|wx.LEFT, 5 )
wSizer13 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
- self.CMD_IN = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 175,25 ), 0 )
+ self.CMD_IN = wx.TextCtrl( self, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 200,20 ), wx.TE_PROCESS_ENTER )
wSizer13.Add( self.CMD_IN, 0, wx.TOP|wx.LEFT, 5 )
- self.Push = wx.Button( self, wx.ID_ANY, u"↑", wx.DefaultPosition, wx.Size( 25,25 ), 0 )
- wSizer13.Add( self.Push, 0, wx.TOP, 5 )
-
bSizer181.Add( wSizer13, 0, 0, 5 )
@@ -674,6 +674,7 @@ def __init__( self, parent ):
self.Bind( wx.EVT_ICONIZE, self.Ico )
self.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.Bind( wx.EVT_MOVE, self.OnMove )
+ self.Bind( wx.EVT_RIGHT_DOWN, self.OnRightDown )
self.Bind( wx.EVT_SIZE, self.Change_Size )
self.Weather.Bind( wx.EVT_BUTTON, self.GetWeather )
self.Note.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
@@ -781,7 +782,8 @@ def __init__( self, parent ):
self.Tip4.Bind( wx.EVT_LEAVE_WINDOW, self.Leave )
self.B_Side_Refresh.Bind( wx.EVT_BUTTON, self.Plug_in_refresh )
self.B_Side_Run.Bind( wx.EVT_BUTTON, self.Plug_in_run )
- self.Push.Bind( wx.EVT_BUTTON, self.CMD_Enter )
+ self.CMD_IN.Bind( wx.EVT_KEY_DOWN, self.CMD_INOnKeyDown )
+ self.CMD_IN.Bind( wx.EVT_TEXT_ENTER, self.CMD_INOnTextEnter )
self.Space1.Bind( wx.EVT_BUTTON, self.Space1_Change )
self.Space2.Bind( wx.EVT_BUTTON, self.Space2_Change )
self.Bottom_Bar2.Bind( wx.EVT_BUTTON, self.BT2 )
@@ -817,6 +819,9 @@ def Hot_Key_Down( self, event ):
def OnMove( self, event ):
event.Skip()
+ def OnRightDown( self, event ):
+ event.Skip()
+
def Change_Size( self, event ):
event.Skip()
@@ -1080,7 +1085,10 @@ def Plug_in_refresh( self, event ):
def Plug_in_run( self, event ):
event.Skip()
- def CMD_Enter( self, event ):
+ def CMD_INOnKeyDown( self, event ):
+ event.Skip()
+
+ def CMD_INOnTextEnter( self, event ):
event.Skip()
def Space1_Change( self, event ):
diff --git a/GUI_About.py b/GUI_About.py
index 9d02cad..af94d75 100644
--- a/GUI_About.py
+++ b/GUI_About.py
@@ -124,7 +124,7 @@ def __init__( self, parent ):
self.C = wx.Panel( self.m_notebook1, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
bSizer41 = wx.BoxSizer( wx.VERTICAL )
- self.m_textCtrl1 = wx.TextCtrl( self.C, wx.ID_ANY, u" GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n.\n", wx.DefaultPosition, wx.Size( 400,500 ), wx.TE_MULTILINE )
+ self.m_textCtrl1 = wx.TextCtrl( self.C, wx.ID_ANY, u" GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation, Inc. \n Everyone is permitted to copy and distribute verbatim copies\n of this license document, but changing it is not allowed.\n\n Preamble\n\n The GNU General Public License is a free, copyleft license for\nsoftware and other kinds of works.\n\n The licenses for most software and other practical works are designed\nto take away your freedom to share and change the works. By contrast,\nthe GNU General Public License is intended to guarantee your freedom to\nshare and change all versions of a program--to make sure it remains free\nsoftware for all its users. We, the Free Software Foundation, use the\nGNU General Public License for most of our software; it applies also to\nany other work released this way by its authors. You can apply it to\nyour programs, too.\n\n When we speak of free software, we are referring to freedom, not\nprice. Our General Public Licenses are designed to make sure that you\nhave the freedom to distribute copies of free software (and charge for\nthem if you wish), that you receive source code or can get it if you\nwant it, that you can change the software or use pieces of it in new\nfree programs, and that you know you can do these things.\n\n To protect your rights, we need to prevent others from denying you\nthese rights or asking you to surrender the rights. Therefore, you have\ncertain responsibilities if you distribute copies of the software, or if\nyou modify it: responsibilities to respect the freedom of others.\n\n For example, if you distribute copies of such a program, whether\ngratis or for a fee, you must pass on to the recipients the same\nfreedoms that you received. You must make sure that they, too, receive\nor can get the source code. And you must show them these terms so they\nknow their rights.\n\n Developers that use the GNU GPL protect your rights with two steps:\n(1) assert copyright on the software, and (2) offer you this License\ngiving you legal permission to copy, distribute and/or modify it.\n\n For the developers' and authors' protection, the GPL clearly explains\nthat there is no warranty for this free software. For both users' and\nauthors' sake, the GPL requires that modified versions be marked as\nchanged, so that their problems will not be attributed erroneously to\nauthors of previous versions.\n\n Some devices are designed to deny users access to install or run\nmodified versions of the software inside them, although the manufacturer\ncan do so. This is fundamentally incompatible with the aim of\nprotecting users' freedom to change the software. The systematic\npattern of such abuse occurs in the area of products for individuals to\nuse, which is precisely where it is most unacceptable. Therefore, we\nhave designed this version of the GPL to prohibit the practice for those\nproducts. If such problems arise substantially in other domains, we\nstand ready to extend this provision to those domains in future versions\nof the GPL, as needed to protect the freedom of users.\n\n Finally, every program is threatened constantly by software patents.\nStates should not allow patents to restrict development and use of\nsoftware on general-purpose computers, but in those that do, we wish to\navoid the special danger that patents applied to a free program could\nmake it effectively proprietary. To prevent this, the GPL assures that\npatents cannot be used to render the program non-free.\n\n The precise terms and conditions for copying, distribution and\nmodification follow.\n\n TERMS AND CONDITIONS\n\n 0. Definitions.\n\n \"This License\" refers to version 3 of the GNU General Public License.\n\n \"Copyright\" also means copyright-like laws that apply to other kinds of\nworks, such as semiconductor masks.\n\n \"The Program\" refers to any copyrightable work licensed under this\nLicense. Each licensee is addressed as \"you\". \"Licensees\" and\n\"recipients\" may be individuals or organizations.\n\n To \"modify\" a work means to copy from or adapt all or part of the work\nin a fashion requiring copyright permission, other than the making of an\nexact copy. The resulting work is called a \"modified version\" of the\nearlier work or a work \"based on\" the earlier work.\n\n A \"covered work\" means either the unmodified Program or a work based\non the Program.\n\n To \"propagate\" a work means to do anything with it that, without\npermission, would make you directly or secondarily liable for\ninfringement under applicable copyright law, except executing it on a\ncomputer or modifying a private copy. Propagation includes copying,\ndistribution (with or without modification), making available to the\npublic, and in some countries other activities as well.\n\n To \"convey\" a work means any kind of propagation that enables other\nparties to make or receive copies. Mere interaction with a user through\na computer network, with no transfer of a copy, is not conveying.\n\n An interactive user interface displays \"Appropriate Legal Notices\"\nto the extent that it includes a convenient and prominently visible\nfeature that (1) displays an appropriate copyright notice, and (2)\ntells the user that there is no warranty for the work (except to the\nextent that warranties are provided), that licensees may convey the\nwork under this License, and how to view a copy of this License. If\nthe interface presents a list of user commands or options, such as a\nmenu, a prominent item in the list meets this criterion.\n\n 1. Source Code.\n\n The \"source code\" for a work means the preferred form of the work\nfor making modifications to it. \"Object code\" means any non-source\nform of a work.\n\n A \"Standard Interface\" means an interface that either is an official\nstandard defined by a recognized standards body, or, in the case of\ninterfaces specified for a particular programming language, one that\nis widely used among developers working in that language.\n\n The \"System Libraries\" of an executable work include anything, other\nthan the work as a whole, that (a) is included in the normal form of\npackaging a Major Component, but which is not part of that Major\nComponent, and (b) serves only to enable use of the work with that\nMajor Component, or to implement a Standard Interface for which an\nimplementation is available to the public in source code form. A\n\"Major Component\", in this context, means a major essential component\n(kernel, window system, and so on) of the specific operating system\n(if any) on which the executable work runs, or a compiler used to\nproduce the work, or an object code interpreter used to run it.\n\n The \"Corresponding Source\" for a work in object code form means all\nthe source code needed to generate, install, and (for an executable\nwork) run the object code and to modify the work, including scripts to\ncontrol those activities. However, it does not include the work's\nSystem Libraries, or general-purpose tools or generally available free\nprograms which are used unmodified in performing those activities but\nwhich are not part of the work. For example, Corresponding Source\nincludes interface definition files associated with source files for\nthe work, and the source code for shared libraries and dynamically\nlinked subprograms that the work is specifically designed to require,\nsuch as by intimate data communication or control flow between those\nsubprograms and other parts of the work.\n\n The Corresponding Source need not include anything that users\ncan regenerate automatically from other parts of the Corresponding\nSource.\n\n The Corresponding Source for a work in source code form is that\nsame work.\n\n 2. Basic Permissions.\n\n All rights granted under this License are granted for the term of\ncopyright on the Program, and are irrevocable provided the stated\nconditions are met. This License explicitly affirms your unlimited\npermission to run the unmodified Program. The output from running a\ncovered work is covered by this License only if the output, given its\ncontent, constitutes a covered work. This License acknowledges your\nrights of fair use or other equivalent, as provided by copyright law.\n\n You may make, run and propagate covered works that you do not\nconvey, without conditions so long as your license otherwise remains\nin force. You may convey covered works to others for the sole purpose\nof having them make modifications exclusively for you, or provide you\nwith facilities for running those works, provided that you comply with\nthe terms of this License in conveying all material for which you do\nnot control copyright. Those thus making or running the covered works\nfor you must do so exclusively on your behalf, under your direction\nand control, on terms that prohibit them from making any copies of\nyour copyrighted material outside their relationship with you.\n\n Conveying under any other circumstances is permitted solely under\nthe conditions stated below. Sublicensing is not allowed; section 10\nmakes it unnecessary.\n\n 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\n\n No covered work shall be deemed part of an effective technological\nmeasure under any applicable law fulfilling obligations under article\n11 of the WIPO copyright treaty adopted on 20 December 1996, or\nsimilar laws prohibiting or restricting circumvention of such\nmeasures.\n\n When you convey a covered work, you waive any legal power to forbid\ncircumvention of technological measures to the extent such circumvention\nis effected by exercising rights under this License with respect to\nthe covered work, and you disclaim any intention to limit operation or\nmodification of the work as a means of enforcing, against the work's\nusers, your or third parties' legal rights to forbid circumvention of\ntechnological measures.\n\n 4. Conveying Verbatim Copies.\n\n You may convey verbatim copies of the Program's source code as you\nreceive it, in any medium, provided that you conspicuously and\nappropriately publish on each copy an appropriate copyright notice;\nkeep intact all notices stating that this License and any\nnon-permissive terms added in accord with section 7 apply to the code;\nkeep intact all notices of the absence of any warranty; and give all\nrecipients a copy of this License along with the Program.\n\n You may charge any price or no price for each copy that you convey,\nand you may offer support or warranty protection for a fee.\n\n 5. Conveying Modified Source Versions.\n\n You may convey a work based on the Program, or the modifications to\nproduce it from the Program, in the form of source code under the\nterms of section 4, provided that you also meet all of these conditions:\n\n a) The work must carry prominent notices stating that you modified\n it, and giving a relevant date.\n\n b) The work must carry prominent notices stating that it is\n released under this License and any conditions added under section\n 7. This requirement modifies the requirement in section 4 to\n \"keep intact all notices\".\n\n c) You must license the entire work, as a whole, under this\n License to anyone who comes into possession of a copy. This\n License will therefore apply, along with any applicable section 7\n additional terms, to the whole of the work, and all its parts,\n regardless of how they are packaged. This License gives no\n permission to license the work in any other way, but it does not\n invalidate such permission if you have separately received it.\n\n d) If the work has interactive user interfaces, each must display\n Appropriate Legal Notices; however, if the Program has interactive\n interfaces that do not display Appropriate Legal Notices, your\n work need not make them do so.\n\n A compilation of a covered work with other separate and independent\nworks, which are not by their nature extensions of the covered work,\nand which are not combined with it such as to form a larger program,\nin or on a volume of a storage or distribution medium, is called an\n\"aggregate\" if the compilation and its resulting copyright are not\nused to limit the access or legal rights of the compilation's users\nbeyond what the individual works permit. Inclusion of a covered work\nin an aggregate does not cause this License to apply to the other\nparts of the aggregate.\n\n 6. Conveying Non-Source Forms.\n\n You may convey a covered work in object code form under the terms\nof sections 4 and 5, provided that you also convey the\nmachine-readable Corresponding Source under the terms of this License,\nin one of these ways:\n\n a) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by the\n Corresponding Source fixed on a durable physical medium\n customarily used for software interchange.\n\n b) Convey the object code in, or embodied in, a physical product\n (including a physical distribution medium), accompanied by a\n written offer, valid for at least three years and valid for as\n long as you offer spare parts or customer support for that product\n model, to give anyone who possesses the object code either (1) a\n copy of the Corresponding Source for all the software in the\n product that is covered by this License, on a durable physical\n medium customarily used for software interchange, for a price no\n more than your reasonable cost of physically performing this\n conveying of source, or (2) access to copy the\n Corresponding Source from a network server at no charge.\n\n c) Convey individual copies of the object code with a copy of the\n written offer to provide the Corresponding Source. This\n alternative is allowed only occasionally and noncommercially, and\n only if you received the object code with such an offer, in accord\n with subsection 6b.\n\n d) Convey the object code by offering access from a designated\n place (gratis or for a charge), and offer equivalent access to the\n Corresponding Source in the same way through the same place at no\n further charge. You need not require recipients to copy the\n Corresponding Source along with the object code. If the place to\n copy the object code is a network server, the Corresponding Source\n may be on a different server (operated by you or a third party)\n that supports equivalent copying facilities, provided you maintain\n clear directions next to the object code saying where to find the\n Corresponding Source. Regardless of what server hosts the\n Corresponding Source, you remain obligated to ensure that it is\n available for as long as needed to satisfy these requirements.\n\n e) Convey the object code using peer-to-peer transmission, provided\n you inform other peers where the object code and Corresponding\n Source of the work are being offered to the general public at no\n charge under subsection 6d.\n\n A separable portion of the object code, whose source code is excluded\nfrom the Corresponding Source as a System Library, need not be\nincluded in conveying the object code work.\n\n A \"User Product\" is either (1) a \"consumer product\", which means any\ntangible personal property which is normally used for personal, family,\nor household purposes, or (2) anything designed or sold for incorporation\ninto a dwelling. In determining whether a product is a consumer product,\ndoubtful cases shall be resolved in favor of coverage. For a particular\nproduct received by a particular user, \"normally used\" refers to a\ntypical or common use of that class of product, regardless of the status\nof the particular user or of the way in which the particular user\nactually uses, or expects or is expected to use, the product. A product\nis a consumer product regardless of whether the product has substantial\ncommercial, industrial or non-consumer uses, unless such uses represent\nthe only significant mode of use of the product.\n\n \"Installation Information\" for a User Product means any methods,\nprocedures, authorization keys, or other information required to install\nand execute modified versions of a covered work in that User Product from\na modified version of its Corresponding Source. The information must\nsuffice to ensure that the continued functioning of the modified object\ncode is in no case prevented or interfered with solely because\nmodification has been made.\n\n If you convey an object code work under this section in, or with, or\nspecifically for use in, a User Product, and the conveying occurs as\npart of a transaction in which the right of possession and use of the\nUser Product is transferred to the recipient in perpetuity or for a\nfixed term (regardless of how the transaction is characterized), the\nCorresponding Source conveyed under this section must be accompanied\nby the Installation Information. But this requirement does not apply\nif neither you nor any third party retains the ability to install\nmodified object code on the User Product (for example, the work has\nbeen installed in ROM).\n\n The requirement to provide Installation Information does not include a\nrequirement to continue to provide support service, warranty, or updates\nfor a work that has been modified or installed by the recipient, or for\nthe User Product in which it has been modified or installed. Access to a\nnetwork may be denied when the modification itself materially and\nadversely affects the operation of the network or violates the rules and\nprotocols for communication across the network.\n\n Corresponding Source conveyed, and Installation Information provided,\nin accord with this section must be in a format that is publicly\ndocumented (and with an implementation available to the public in\nsource code form), and must require no special password or key for\nunpacking, reading or copying.\n\n 7. Additional Terms.\n\n \"Additional permissions\" are terms that supplement the terms of this\nLicense by making exceptions from one or more of its conditions.\nAdditional permissions that are applicable to the entire Program shall\nbe treated as though they were included in this License, to the extent\nthat they are valid under applicable law. If additional permissions\napply only to part of the Program, that part may be used separately\nunder those permissions, but the entire Program remains governed by\nthis License without regard to the additional permissions.\n\n When you convey a copy of a covered work, you may at your option\nremove any additional permissions from that copy, or from any part of\nit. (Additional permissions may be written to require their own\nremoval in certain cases when you modify the work.) You may place\nadditional permissions on material, added by you to a covered work,\nfor which you have or can give appropriate copyright permission.\n\n Notwithstanding any other provision of this License, for material you\nadd to a covered work, you may (if authorized by the copyright holders of\nthat material) supplement the terms of this License with terms:\n\n a) Disclaiming warranty or limiting liability differently from the\n terms of sections 15 and 16 of this License; or\n\n b) Requiring preservation of specified reasonable legal notices or\n author attributions in that material or in the Appropriate Legal\n Notices displayed by works containing it; or\n\n c) Prohibiting misrepresentation of the origin of that material, or\n requiring that modified versions of such material be marked in\n reasonable ways as different from the original version; or\n\n d) Limiting the use for publicity purposes of names of licensors or\n authors of the material; or\n\n e) Declining to grant rights under trademark law for use of some\n trade names, trademarks, or service marks; or\n\n f) Requiring indemnification of licensors and authors of that\n material by anyone who conveys the material (or modified versions of\n it) with contractual assumptions of liability to the recipient, for\n any liability that these contractual assumptions directly impose on\n those licensors and authors.\n\n All other non-permissive additional terms are considered \"further\nrestrictions\" within the meaning of section 10. If the Program as you\nreceived it, or any part of it, contains a notice stating that it is\ngoverned by this License along with a term that is a further\nrestriction, you may remove that term. If a license document contains\na further restriction but permits relicensing or conveying under this\nLicense, you may add to a covered work material governed by the terms\nof that license document, provided that the further restriction does\nnot survive such relicensing or conveying.\n\n If you add terms to a covered work in accord with this section, you\nmust place, in the relevant source files, a statement of the\nadditional terms that apply to those files, or a notice indicating\nwhere to find the applicable terms.\n\n Additional terms, permissive or non-permissive, may be stated in the\nform of a separately written license, or stated as exceptions;\nthe above requirements apply either way.\n\n 8. Termination.\n\n You may not propagate or modify a covered work except as expressly\nprovided under this License. Any attempt otherwise to propagate or\nmodify it is void, and will automatically terminate your rights under\nthis License (including any patent licenses granted under the third\nparagraph of section 11).\n\n However, if you cease all violation of this License, then your\nlicense from a particular copyright holder is reinstated (a)\nprovisionally, unless and until the copyright holder explicitly and\nfinally terminates your license, and (b) permanently, if the copyright\nholder fails to notify you of the violation by some reasonable means\nprior to 60 days after the cessation.\n\n Moreover, your license from a particular copyright holder is\nreinstated permanently if the copyright holder notifies you of the\nviolation by some reasonable means, this is the first time you have\nreceived notice of violation of this License (for any work) from that\ncopyright holder, and you cure the violation prior to 30 days after\nyour receipt of the notice.\n\n Termination of your rights under this section does not terminate the\nlicenses of parties who have received copies or rights from you under\nthis License. If your rights have been terminated and not permanently\nreinstated, you do not qualify to receive new licenses for the same\nmaterial under section 10.\n\n 9. Acceptance Not Required for Having Copies.\n\n You are not required to accept this License in order to receive or\nrun a copy of the Program. Ancillary propagation of a covered work\noccurring solely as a consequence of using peer-to-peer transmission\nto receive a copy likewise does not require acceptance. However,\nnothing other than this License grants you permission to propagate or\nmodify any covered work. These actions infringe copyright if you do\nnot accept this License. Therefore, by modifying or propagating a\ncovered work, you indicate your acceptance of this License to do so.\n\n 10. Automatic Licensing of Downstream Recipients.\n\n Each time you convey a covered work, the recipient automatically\nreceives a license from the original licensors, to run, modify and\npropagate that work, subject to this License. You are not responsible\nfor enforcing compliance by third parties with this License.\n\n An \"entity transaction\" is a transaction transferring control of an\norganization, or substantially all assets of one, or subdividing an\norganization, or merging organizations. If propagation of a covered\nwork results from an entity transaction, each party to that\ntransaction who receives a copy of the work also receives whatever\nlicenses to the work the party's predecessor in interest had or could\ngive under the previous paragraph, plus a right to possession of the\nCorresponding Source of the work from the predecessor in interest, if\nthe predecessor has it or can get it with reasonable efforts.\n\n You may not impose any further restrictions on the exercise of the\nrights granted or affirmed under this License. For example, you may\nnot impose a license fee, royalty, or other charge for exercise of\nrights granted under this License, and you may not initiate litigation\n(including a cross-claim or counterclaim in a lawsuit) alleging that\nany patent claim is infringed by making, using, selling, offering for\nsale, or importing the Program or any portion of it.\n\n 11. Patents.\n\n A \"contributor\" is a copyright holder who authorizes use under this\nLicense of the Program or a work on which the Program is based. The\nwork thus licensed is called the contributor's \"contributor version\".\n\n A contributor's \"essential patent claims\" are all patent claims\nowned or controlled by the contributor, whether already acquired or\nhereafter acquired, that would be infringed by some manner, permitted\nby this License, of making, using, or selling its contributor version,\nbut do not include claims that would be infringed only as a\nconsequence of further modification of the contributor version. For\npurposes of this definition, \"control\" includes the right to grant\npatent sublicenses in a manner consistent with the requirements of\nthis License.\n\n Each contributor grants you a non-exclusive, worldwide, royalty-free\npatent license under the contributor's essential patent claims, to\nmake, use, sell, offer for sale, import and otherwise run, modify and\npropagate the contents of its contributor version.\n\n In the following three paragraphs, a \"patent license\" is any express\nagreement or commitment, however denominated, not to enforce a patent\n(such as an express permission to practice a patent or covenant not to\nsue for patent infringement). To \"grant\" such a patent license to a\nparty means to make such an agreement or commitment not to enforce a\npatent against the party.\n\n If you convey a covered work, knowingly relying on a patent license,\nand the Corresponding Source of the work is not available for anyone\nto copy, free of charge and under the terms of this License, through a\npublicly available network server or other readily accessible means,\nthen you must either (1) cause the Corresponding Source to be so\navailable, or (2) arrange to deprive yourself of the benefit of the\npatent license for this particular work, or (3) arrange, in a manner\nconsistent with the requirements of this License, to extend the patent\nlicense to downstream recipients. \"Knowingly relying\" means you have\nactual knowledge that, but for the patent license, your conveying the\ncovered work in a country, or your recipient's use of the covered work\nin a country, would infringe one or more identifiable patents in that\ncountry that you have reason to believe are valid.\n\n If, pursuant to or in connection with a single transaction or\narrangement, you convey, or propagate by procuring conveyance of, a\ncovered work, and grant a patent license to some of the parties\nreceiving the covered work authorizing them to use, propagate, modify\nor convey a specific copy of the covered work, then the patent license\nyou grant is automatically extended to all recipients of the covered\nwork and works based on it.\n\n A patent license is \"discriminatory\" if it does not include within\nthe scope of its coverage, prohibits the exercise of, or is\nconditioned on the non-exercise of one or more of the rights that are\nspecifically granted under this License. You may not convey a covered\nwork if you are a party to an arrangement with a third party that is\nin the business of distributing software, under which you make payment\nto the third party based on the extent of your activity of conveying\nthe work, and under which the third party grants, to any of the\nparties who would receive the covered work from you, a discriminatory\npatent license (a) in connection with copies of the covered work\nconveyed by you (or copies made from those copies), or (b) primarily\nfor and in connection with specific products or compilations that\ncontain the covered work, unless you entered into that arrangement,\nor that patent license was granted, prior to 28 March 2007.\n\n Nothing in this License shall be construed as excluding or limiting\nany implied license or other defenses to infringement that may\notherwise be available to you under applicable patent law.\n\n 12. No Surrender of Others' Freedom.\n\n If conditions are imposed on you (whether by court order, agreement or\notherwise) that contradict the conditions of this License, they do not\nexcuse you from the conditions of this License. If you cannot convey a\ncovered work so as to satisfy simultaneously your obligations under this\nLicense and any other pertinent obligations, then as a consequence you may\nnot convey it at all. For example, if you agree to terms that obligate you\nto collect a royalty for further conveying from those to whom you convey\nthe Program, the only way you could satisfy both those terms and this\nLicense would be to refrain entirely from conveying the Program.\n\n 13. Use with the GNU Affero General Public License.\n\n Notwithstanding any other provision of this License, you have\npermission to link or combine any covered work with a work licensed\nunder version 3 of the GNU Affero General Public License into a single\ncombined work, and to convey the resulting work. The terms of this\nLicense will continue to apply to the part which is the covered work,\nbut the special requirements of the GNU Affero General Public License,\nsection 13, concerning interaction through a network will apply to the\ncombination as such.\n\n 14. Revised Versions of this License.\n\n The Free Software Foundation may publish revised and/or new versions of\nthe GNU General Public License from time to time. Such new versions will\nbe similar in spirit to the present version, but may differ in detail to\naddress new problems or concerns.\n\n Each version is given a distinguishing version number. If the\nProgram specifies that a certain numbered version of the GNU General\nPublic License \"or any later version\" applies to it, you have the\noption of following the terms and conditions either of that numbered\nversion or of any later version published by the Free Software\nFoundation. If the Program does not specify a version number of the\nGNU General Public License, you may choose any version ever published\nby the Free Software Foundation.\n\n If the Program specifies that a proxy can decide which future\nversions of the GNU General Public License can be used, that proxy's\npublic statement of acceptance of a version permanently authorizes you\nto choose that version for the Program.\n\n Later license versions may give you additional or different\npermissions. However, no additional obligations are imposed on any\nauthor or copyright holder as a result of your choosing to follow a\nlater version.\n\n 15. Disclaimer of Warranty.\n\n THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\nAPPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\nHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM \"AS IS\" WITHOUT WARRANTY\nOF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\nIS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\nALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n\n 16. Limitation of Liability.\n\n IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\nWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\nTHE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\nGENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\nUSE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\nDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\nPARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\nEVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGES.\n\n 17. Interpretation of Sections 15 and 16.\n\n If the disclaimer of warranty and limitation of liability provided\nabove cannot be given local legal effect according to their terms,\nreviewing courts shall apply local law that most closely approximates\nan absolute waiver of all civil liability in connection with the\nProgram, unless a warranty or assumption of liability accompanies a\ncopy of the Program in return for a fee.\n\n END OF TERMS AND CONDITIONS\n\n How to Apply These Terms to Your New Programs\n\n If you develop a new program, and you want it to be of the greatest\npossible use to the public, the best way to achieve this is to make it\nfree software which everyone can redistribute and change under these terms.\n\n To do so, attach the following notices to the program. It is safest\nto attach them to the start of each source file to most effectively\nstate the exclusion of warranty; and each file should have at least\nthe \"copyright\" line and a pointer to where the full notice is found.\n\n \n Copyright (C) \n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see .\n\nAlso add information on how to contact you by electronic and paper mail.\n\n If the program does terminal interaction, make it output a short\nnotice like this when it starts in an interactive mode:\n\n Copyright (C) \n This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\n This is free software, and you are welcome to redistribute it\n under certain conditions; type `show c' for details.\n\nThe hypothetical commands `show w' and `show c' should show the appropriate\nparts of the General Public License. Of course, your program's commands\nmight be different; for a GUI interface, you would use an \"about box\".\n\n You should also get your employer (if you work as a programmer) or school,\nif any, to sign a \"copyright disclaimer\" for the program, if necessary.\nFor more information on this, and how to apply and follow the GNU GPL, see\n.\n\n The GNU General Public License does not permit incorporating your program\ninto proprietary programs. If your program is a subroutine library, you\nmay consider it more useful to permit linking proprietary applications with\nthe library. If this is what you want to do, use the GNU Lesser General\nPublic License instead of this License. But first, please read\n.\n", wx.DefaultPosition, wx.Size( 400,500 ), wx.TE_MULTILINE|wx.TE_READONLY )
bSizer41.Add( self.m_textCtrl1, 0, 0, 5 )
diff --git a/GUI_SSC.py b/GUI_SSC.py
index 082ba15..e9f3b6d 100644
--- a/GUI_SSC.py
+++ b/GUI_SSC.py
@@ -18,9 +18,9 @@
class Main ( wx.Frame ):
def __init__( self, parent ):
- wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"RBS_SSC V5", pos = wx.DefaultPosition, size = wx.Size( 500,600 ), style = wx.CAPTION|wx.CLOSE_BOX|wx.RESIZE_BORDER|wx.TAB_TRAVERSAL )
+ wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"RBS_SSC V6", pos = wx.DefaultPosition, size = wx.Size( 500,600 ), style = wx.DEFAULT_FRAME_STYLE|wx.RESIZE_BORDER|wx.TAB_TRAVERSAL )
- self.SetSizeHints( wx.Size( 500,600 ), wx.Size( 1000,600 ) )
+ self.SetSizeHints( wx.Size( 500,600 ), wx.Size( -1,-1 ) )
self.SetBackgroundColour( wx.Colour( 255, 255, 255 ) )
bSizer2 = wx.BoxSizer( wx.VERTICAL )
@@ -29,7 +29,85 @@ def __init__( self, parent ):
self.A = wx.Panel( self.NoteBook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
bSizer21 = wx.BoxSizer( wx.VERTICAL )
- self.A_GRID = wx.grid.Grid( self.A, wx.ID_ANY, wx.DefaultPosition, wx.Size( 1000,300 ), 0 )
+ wSizer5 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
+
+ self.A_NUM = wx.StaticText( self.A, wx.ID_ANY, u"学号:0000", wx.DefaultPosition, wx.Size( 130,-1 ), 0 )
+ self.A_NUM.Wrap( -1 )
+
+ self.A_NUM.SetBackgroundColour( wx.Colour( 227, 227, 227 ) )
+
+ wSizer5.Add( self.A_NUM, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
+
+ self.A_key_list = wx.StaticText( self.A, wx.ID_ANY, u"[]", wx.DefaultPosition, wx.Size( 100,-1 ), 0 )
+ self.A_key_list.Wrap( -1 )
+
+ self.A_key_list.SetBackgroundColour( wx.Colour( 228, 228, 228 ) )
+
+ wSizer5.Add( self.A_key_list, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
+
+ self.A_Replace = wx.Button( self.A, wx.ID_ANY, u"复位", wx.DefaultPosition, wx.DefaultSize, 0 )
+ wSizer5.Add( self.A_Replace, 0, wx.ALL, 5 )
+
+ self.A_Edit_State_Colour = wx.Button( self.A, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 25,-1 ), wx.BORDER_NONE )
+ self.A_Edit_State_Colour.SetBackgroundColour( wx.Colour( 192, 192, 192 ) )
+
+ wSizer5.Add( self.A_Edit_State_Colour, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
+
+ self.A_Edit_State_Text = wx.StaticText( self.A, wx.ID_ANY, u"---", wx.DefaultPosition, wx.Size( 50,-1 ), 0 )
+ self.A_Edit_State_Text.Wrap( -1 )
+
+ wSizer5.Add( self.A_Edit_State_Text, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
+
+
+ bSizer21.Add( wSizer5, 0, 0, 5 )
+
+ wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
+
+ A_Kind_choiceChoices = [ u"A", u"B", u"C", u"D", u"E" ]
+ self.A_Kind_choice = wx.Choice( self.A, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, A_Kind_choiceChoices, 0 )
+ self.A_Kind_choice.SetSelection( 0 )
+ wSizer6.Add( self.A_Kind_choice, 0, wx.ALL, 5 )
+
+ A_ClassChoices = [ u"Class1", u"Class2", u"Class3", u"Class4", u"Class5", u"Class6", u"Class7", u"Class8", u"Class9" ]
+ self.A_Class = wx.Choice( self.A, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, A_ClassChoices, 0 )
+ self.A_Class.SetSelection( 7 )
+ wSizer6.Add( self.A_Class, 0, wx.ALL, 5 )
+
+ A_Input_StyleChoices = [ u"换行符(自动换行)", u"无换行符" ]
+ self.A_Input_Style = wx.Choice( self.A, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, A_Input_StyleChoices, 0 )
+ self.A_Input_Style.SetSelection( 0 )
+ self.A_Input_Style.Enable( False )
+
+ wSizer6.Add( self.A_Input_Style, 0, wx.ALL, 5 )
+
+ self.A_Clean = wx.Button( self.A, wx.ID_ANY, u"清空", wx.DefaultPosition, wx.DefaultSize, 0 )
+ wSizer6.Add( self.A_Clean, 0, wx.ALL, 5 )
+
+
+ bSizer21.Add( wSizer6, 0, 0, 5 )
+
+ wSizer4 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
+
+ self.A_Export = wx.Button( self.A, wx.ID_ANY, u"导出Excel", wx.DefaultPosition, wx.DefaultSize, 0 )
+ wSizer4.Add( self.A_Export, 0, wx.ALL, 5 )
+
+ self.A_Save_path = wx.DirPickerCtrl( self.A, wx.ID_ANY, wx.EmptyString, u"Select a folder", wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DEFAULT_STYLE )
+ wSizer4.Add( self.A_Save_path, 0, wx.ALL, 5 )
+
+ self.A_Auto_Focus = wx.CheckBox( self.A, wx.ID_ANY, u"导出后自动定位文件", wx.DefaultPosition, wx.DefaultSize, 0 )
+ self.A_Auto_Focus.SetValue(True)
+ wSizer4.Add( self.A_Auto_Focus, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
+
+
+ bSizer21.Add( wSizer4, 0, 0, 5 )
+
+ self.A_Report = wx.TextCtrl( self.A, wx.ID_ANY, u"没有任何数据的栏目:", wx.DefaultPosition, wx.Size( 2000,90 ), wx.TE_MULTILINE|wx.TE_READONLY )
+ self.A_Report.SetFont( wx.Font( 10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
+ self.A_Report.SetForegroundColour( wx.Colour( 255, 0, 0 ) )
+
+ bSizer21.Add( self.A_Report, 0, wx.ALL, 5 )
+
+ self.A_GRID = wx.grid.Grid( self.A, wx.ID_ANY, wx.DefaultPosition, wx.Size( 2000,1500 ), 0 )
# Grid
self.A_GRID.CreateGrid( 50, 5 )
@@ -112,92 +190,11 @@ def __init__( self, parent ):
self.A_GRID.SetDefaultCellAlignment( wx.ALIGN_CENTER, wx.ALIGN_TOP )
bSizer21.Add( self.A_GRID, 0, wx.ALL, 5 )
- self.AST_Line = wx.StaticLine( self.A, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
- bSizer21.Add( self.AST_Line, 0, wx.EXPAND |wx.ALL, 5 )
-
- wSizer5 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
-
- self.A_NUM = wx.StaticText( self.A, wx.ID_ANY, u"学号:0000", wx.DefaultPosition, wx.Size( 130,-1 ), 0 )
- self.A_NUM.Wrap( -1 )
-
- self.A_NUM.SetBackgroundColour( wx.Colour( 227, 227, 227 ) )
-
- wSizer5.Add( self.A_NUM, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
-
- self.A_key_list = wx.StaticText( self.A, wx.ID_ANY, u"[]", wx.DefaultPosition, wx.Size( 100,-1 ), 0 )
- self.A_key_list.Wrap( -1 )
-
- self.A_key_list.SetBackgroundColour( wx.Colour( 228, 228, 228 ) )
-
- wSizer5.Add( self.A_key_list, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
-
- self.A_Replace = wx.Button( self.A, wx.ID_ANY, u"复位", wx.DefaultPosition, wx.DefaultSize, 0 )
- wSizer5.Add( self.A_Replace, 0, wx.ALL, 5 )
-
- self.A_Edit_State_Colour = wx.Button( self.A, wx.ID_ANY, wx.EmptyString, wx.DefaultPosition, wx.Size( 25,-1 ), wx.BORDER_NONE )
- self.A_Edit_State_Colour.SetBackgroundColour( wx.Colour( 192, 192, 192 ) )
-
- wSizer5.Add( self.A_Edit_State_Colour, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
-
- self.A_Edit_State_Text = wx.StaticText( self.A, wx.ID_ANY, u"---", wx.DefaultPosition, wx.Size( 50,-1 ), 0 )
- self.A_Edit_State_Text.Wrap( -1 )
-
- wSizer5.Add( self.A_Edit_State_Text, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
-
-
- bSizer21.Add( wSizer5, 0, 0, 5 )
-
- wSizer6 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
-
- A_Kind_choiceChoices = [ u"A", u"B", u"C", u"D", u"E" ]
- self.A_Kind_choice = wx.Choice( self.A, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, A_Kind_choiceChoices, 0 )
- self.A_Kind_choice.SetSelection( 0 )
- wSizer6.Add( self.A_Kind_choice, 0, wx.ALL, 5 )
-
- A_ClassChoices = [ u"Class1", u"Class2", u"Class3", u"Class4", u"Class5", u"Class6", u"Class7", u"Class8", u"Class9" ]
- self.A_Class = wx.Choice( self.A, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, A_ClassChoices, 0 )
- self.A_Class.SetSelection( 7 )
- wSizer6.Add( self.A_Class, 0, wx.ALL, 5 )
-
- A_Input_StyleChoices = [ u"换行符(自动换行)", u"无换行符" ]
- self.A_Input_Style = wx.Choice( self.A, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, A_Input_StyleChoices, 0 )
- self.A_Input_Style.SetSelection( 0 )
- self.A_Input_Style.Enable( False )
-
- wSizer6.Add( self.A_Input_Style, 0, wx.ALL, 5 )
-
- self.A_Clean = wx.Button( self.A, wx.ID_ANY, u"清空", wx.DefaultPosition, wx.DefaultSize, 0 )
- wSizer6.Add( self.A_Clean, 0, wx.ALL, 5 )
-
-
- bSizer21.Add( wSizer6, 0, 0, 5 )
-
- wSizer4 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
-
- self.A_Export = wx.Button( self.A, wx.ID_ANY, u"导出Excel", wx.DefaultPosition, wx.DefaultSize, 0 )
- wSizer4.Add( self.A_Export, 0, wx.ALL, 5 )
-
- self.A_Save_path = wx.DirPickerCtrl( self.A, wx.ID_ANY, wx.EmptyString, u"Select a folder", wx.DefaultPosition, wx.DefaultSize, wx.DIRP_DEFAULT_STYLE )
- wSizer4.Add( self.A_Save_path, 0, wx.ALL, 5 )
-
- self.A_Auto_Focus = wx.CheckBox( self.A, wx.ID_ANY, u"导出后自动定位文件", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.A_Auto_Focus.SetValue(True)
- wSizer4.Add( self.A_Auto_Focus, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 5 )
-
-
- bSizer21.Add( wSizer4, 1, wx.EXPAND, 5 )
-
- self.A_Report = wx.TextCtrl( self.A, wx.ID_ANY, u"没有任何数据的栏目:", wx.DefaultPosition, wx.Size( 1000,90 ), wx.TE_MULTILINE|wx.TE_READONLY )
- self.A_Report.SetFont( wx.Font( 10, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "微软雅黑" ) )
- self.A_Report.SetForegroundColour( wx.Colour( 255, 0, 0 ) )
-
- bSizer21.Add( self.A_Report, 0, wx.ALL, 5 )
-
self.A.SetSizer( bSizer21 )
self.A.Layout()
bSizer21.Fit( self.A )
- self.NoteBook.AddPage( self.A, u"条形码登记", False )
+ self.NoteBook.AddPage( self.A, u"条形码登记", True )
self.m_panel2 = wx.Panel( self.NoteBook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
bSizer4 = wx.BoxSizer( wx.VERTICAL )
@@ -237,67 +234,39 @@ def __init__( self, parent ):
self.m_staticline2 = wx.StaticLine( self.C, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
bSizer6.Add( self.m_staticline2, 0, wx.EXPAND |wx.ALL, 5 )
- C_ListBoxChoices = []
- self.C_ListBox = wx.ListBox( self.C, wx.ID_ANY, wx.DefaultPosition, wx.Size( 1000,120 ), C_ListBoxChoices, 0 )
- bSizer6.Add( self.C_ListBox, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL, 5 )
-
- self.m_staticline4 = wx.StaticLine( self.C, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
- bSizer6.Add( self.m_staticline4, 0, wx.EXPAND |wx.ALL, 5 )
-
- wSizer41 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
-
- self.C_Col1 = wx.StaticText( self.C, wx.ID_ANY, u"列A权重:0", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.C_Col1.Wrap( -1 )
-
- wSizer41.Add( self.C_Col1, 0, wx.ALL, 5 )
-
- self.C_Col2 = wx.StaticText( self.C, wx.ID_ANY, u"列B权重:0", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.C_Col2.Wrap( -1 )
-
- wSizer41.Add( self.C_Col2, 0, wx.ALL, 5 )
-
- self.C_Col3 = wx.StaticText( self.C, wx.ID_ANY, u"列C权重:0", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.C_Col3.Wrap( -1 )
-
- wSizer41.Add( self.C_Col3, 0, wx.ALL, 5 )
-
- self.C_Col4 = wx.StaticText( self.C, wx.ID_ANY, u"列D权重:0", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.C_Col4.Wrap( -1 )
-
- wSizer41.Add( self.C_Col4, 0, wx.ALL, 5 )
-
- self.C_Col5 = wx.StaticText( self.C, wx.ID_ANY, u"列E权重:0", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.C_Col5.Wrap( -1 )
-
- wSizer41.Add( self.C_Col5, 0, wx.ALL, 5 )
-
-
- bSizer6.Add( wSizer41, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
-
wSizer61 = wx.WrapSizer( wx.HORIZONTAL, wx.WRAPSIZER_DEFAULT_FLAGS )
- self.C_L = wx.StaticText( self.C, wx.ID_ANY, u"---", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.C_L.Wrap( -1 )
-
- wSizer61.Add( self.C_L, 0, wx.ALL, 5 )
+ C_ListBoxChoices = []
+ self.C_ListBox = wx.ListBox( self.C, wx.ID_ANY, wx.DefaultPosition, wx.Size( 300,120 ), C_ListBoxChoices, 0 )
+ wSizer61.Add( self.C_ListBox, 0, wx.ALL, 5 )
- self.C_Guage = wx.Gauge( self.C, wx.ID_ANY, 100, wx.DefaultPosition, wx.Size( 350,-1 ), wx.GA_HORIZONTAL )
- self.C_Guage.SetValue( 0 )
- wSizer61.Add( self.C_Guage, 0, wx.ALL, 5 )
+ C_PathBoxChoices = []
+ self.C_PathBox = wx.ListBox( self.C, wx.ID_ANY, wx.DefaultPosition, wx.Size( 150,120 ), C_PathBoxChoices, wx.LB_EXTENDED|wx.LB_HSCROLL )
+ wSizer61.Add( self.C_PathBox, 0, wx.ALL, 5 )
- self.C_R = wx.StaticText( self.C, wx.ID_ANY, u"---", wx.DefaultPosition, wx.DefaultSize, 0 )
- self.C_R.Wrap( -1 )
- wSizer61.Add( self.C_R, 0, wx.ALL, 5 )
+ bSizer6.Add( wSizer61, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
+ self.m_staticline4 = wx.StaticLine( self.C, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LI_HORIZONTAL )
+ bSizer6.Add( self.m_staticline4, 0, wx.EXPAND |wx.ALL, 5 )
- bSizer6.Add( wSizer61, 0, wx.ALIGN_CENTER_HORIZONTAL, 5 )
+ self.m_gauge3 = wx.Gauge( self.C, wx.ID_ANY, 100, wx.DefaultPosition, wx.Size( 2000,-1 ), wx.GA_HORIZONTAL )
+ self.m_gauge3.SetValue( 0 )
+ bSizer6.Add( self.m_gauge3, 0, wx.ALL, 5 )
self.C.SetSizer( bSizer6 )
self.C.Layout()
bSizer6.Fit( self.C )
- self.NoteBook.AddPage( self.C, u"分析", True )
+ self.NoteBook.AddPage( self.C, u"分析", False )
+ self.D = wx.Panel( self.NoteBook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
+ bSizer61 = wx.BoxSizer( wx.VERTICAL )
+
+
+ self.D.SetSizer( bSizer61 )
+ self.D.Layout()
+ bSizer61.Fit( self.D )
+ self.NoteBook.AddPage( self.D, u"节点", False )
bSizer2.Add( self.NoteBook, 0, 0, 0 )
@@ -310,13 +279,6 @@ def __init__( self, parent ):
# Connect Events
self.Bind( wx.EVT_CLOSE, self.Close )
self.Bind( wx.EVT_SIZE, self.MainOnSize )
- self.A_GRID.Bind( wx.grid.EVT_GRID_EDITOR_HIDDEN, self.A_GRIDOnGridEditorHidden )
- self.A_GRID.Bind( wx.grid.EVT_GRID_EDITOR_SHOWN, self.A_GRIDOnGridEditorShown )
- self.A_GRID.Bind( wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.A_GRIDOnGridLabelLeftClick )
- self.A_GRID.Bind( wx.grid.EVT_GRID_LABEL_LEFT_DCLICK, self.A_GRIDOnGridLabelLeftDClick )
- self.A_GRID.Bind( wx.grid.EVT_GRID_SELECT_CELL, self.A_GRIDOnGridSelectCell )
- self.A_GRID.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
- self.A_GRID.Bind( wx.EVT_KILL_FOCUS, self.A_GRIDOnKillFocus )
self.A_NUM.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.A_key_list.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
self.A_Replace.Bind( wx.EVT_BUTTON, self.Replace )
@@ -327,6 +289,14 @@ def __init__( self, parent ):
self.A_Clean.Bind( wx.EVT_BUTTON, self.Clean )
self.A_Export.Bind( wx.EVT_BUTTON, self.Export )
self.A_Auto_Focus.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
+ self.A_GRID.Bind( wx.grid.EVT_GRID_EDITOR_HIDDEN, self.A_GRIDOnGridEditorHidden )
+ self.A_GRID.Bind( wx.grid.EVT_GRID_EDITOR_SHOWN, self.A_GRIDOnGridEditorShown )
+ self.A_GRID.Bind( wx.grid.EVT_GRID_LABEL_LEFT_CLICK, self.A_GRIDOnGridLabelLeftClick )
+ self.A_GRID.Bind( wx.grid.EVT_GRID_LABEL_LEFT_DCLICK, self.A_GRIDOnGridLabelLeftDClick )
+ self.A_GRID.Bind( wx.grid.EVT_GRID_SELECT_CELL, self.A_GRIDOnGridSelectCell )
+ self.A_GRID.Bind( wx.EVT_KEY_DOWN, self.Hot_Key_Down )
+ self.A_GRID.Bind( wx.EVT_KILL_FOCUS, self.A_GRIDOnKillFocus )
+ self.C_PathBox.Bind( wx.EVT_LISTBOX, self.C_Check )
def __del__( self ):
pass
@@ -339,45 +309,48 @@ def Close( self, event ):
def MainOnSize( self, event ):
event.Skip()
- def A_GRIDOnGridEditorHidden( self, event ):
+ def Hot_Key_Down( self, event ):
event.Skip()
- def A_GRIDOnGridEditorShown( self, event ):
- event.Skip()
- def A_GRIDOnGridLabelLeftClick( self, event ):
+ def Replace( self, event ):
event.Skip()
- def A_GRIDOnGridLabelLeftDClick( self, event ):
- event.Skip()
- def A_GRIDOnGridSelectCell( self, event ):
+ def Change_Class( self, event ):
event.Skip()
- def Hot_Key_Down( self, event ):
+
+ def Change_Style( self, event ):
event.Skip()
- def A_GRIDOnKillFocus( self, event ):
+ def Clean( self, event ):
event.Skip()
+ def Export( self, event ):
+ event.Skip()
- def Replace( self, event ):
+ def A_GRIDOnGridEditorHidden( self, event ):
event.Skip()
-
- def Change_Class( self, event ):
+ def A_GRIDOnGridEditorShown( self, event ):
event.Skip()
+ def A_GRIDOnGridLabelLeftClick( self, event ):
+ event.Skip()
- def Change_Style( self, event ):
+ def A_GRIDOnGridLabelLeftDClick( self, event ):
event.Skip()
- def Clean( self, event ):
+ def A_GRIDOnGridSelectCell( self, event ):
event.Skip()
- def Export( self, event ):
+
+ def A_GRIDOnKillFocus( self, event ):
event.Skip()
+ def C_Check( self, event ):
+ event.Skip()
diff --git a/M_About.py b/M_About.py
index 247b70c..1409844 100644
--- a/M_About.py
+++ b/M_About.py
@@ -24,6 +24,8 @@ def __init__(self, parent):
self.version.SetLabel('Version#' + version)
+ self.m_notebook1.SetSelection(0)
+
def Close(self, event):
try:
if app.GetAppName() != '_core.cp38-win_amd64':
diff --git a/M_Draw.py b/M_Draw.py
index 1097177..0dbfd76 100644
--- a/M_Draw.py
+++ b/M_Draw.py
@@ -16,13 +16,12 @@ def __init__(self, parent):
GUI_Draw.Main.__init__(self, parent)
def EVT_PAINT(self,event):
- global dc
+ global dc,gc,path
# Create paint DC
dc = wx.PaintDC(self)
# Create graphics context from it
gc = wx.GraphicsContext.Create(dc)
-
gc.SetAntialiasMode(True)
# make a path that contains a circle and some lines
@@ -39,12 +38,8 @@ def EVT_PAINT(self,event):
gc.StrokePath(path)
def MainOnLeftDown(self, event):
- global dc
- ##dc.DrawCircle(event.)
-
- def OnMove(self,event):
- pos = event.GetPosition()
- print(pos)
+ path.AddCircle(event.GetPosition()[0],event.GetPosition()[1],1)
+ gc.StrokePath(path)
def Close(self, event):
try:
diff --git a/M_Roll.py b/M_Roll.py
index 0095b98..a5ab220 100644
--- a/M_Roll.py
+++ b/M_Roll.py
@@ -19,6 +19,8 @@ def __init__(self, parent):
self.SetDoubleBuffered(True) # 声明:启用双缓冲
+ self.notebook.SetSelection(0)
+
if self.Using_TimeSeed.IsChecked() == False:
random.seed(self.SP_Seed.GetValue())
else:
diff --git a/M_SSC.py b/M_SSC.py
index 04bddcd..fc59b32 100644
--- a/M_SSC.py
+++ b/M_SSC.py
@@ -3,9 +3,15 @@
##############################
import wx
import xlwt,xlrd
+import wx.lib.plot as plot
import win32api,win32con
import os
import time,datetime
+import ctypes
+
+from gsnodegraph import EVT_GSNODEGRAPH_ADDNODEBTN
+import nodes
+from nodegraph import NodeGraph
import GUI_SSC
@@ -36,9 +42,49 @@ def __init__(self, parent):
self.A_Edit_State_Colour.SetBackgroundColour((192,192,192))
self.A_Edit_State_Text.SetLabel('静待')
+
+ # Setup the node registry
+ node_registry = {
+ 'excel_importid': nodes.Excel_import,
+ "value_nodeid": nodes.ValueNode,
+ "output_nodeid": nodes.OutputNode,
+ }
+ # Setup the config with datatypes and node categories
+ config = {
+ "image_datatype": "IMAGE",
+ "node_datatypes": {
+ "IMAGE": "#C6C62D", # Yellow
+ "INTEGER": "#A0A0A0", # Grey
+ "FLOAT": "#A0A0A0", # Grey
+ "VALUE": "#A0A0A0", # Depreciated!
+ },
+ "node_categories": {
+ "INPUT": "#E64555", # Burgendy
+ "DRAW": "#AF4467", # Pink
+ "MASK": "#084D4D", # Blue-green
+ "CONVERT": "#564B7C", # Purple
+ "FILTER": "#558333", # Green
+ "BLEND": "#498DB8", # Light blue
+ "COLOR": "#C2AF3A", # Yellow
+ "TRANSFORM": "#6B8B8B", # Blue-grey
+ "OUTPUT": "#B33641" # Red
+ }
+ }
+ # Init the nodegraph
+ ##print(self.NoteBook.GetPage(3))
+ ng = NodeGraph(self.NoteBook.GetPage(3), registry=node_registry, config=config,size=(500,600))
+
+ # Add nodes to the node graph
+ ng.AddNode("excel_importid", pos=wx.Point(100, 10))
+ ng.AddNode("output_nodeid", pos=wx.Point(300, 10))
+
+ ng.Bind(EVT_GSNODEGRAPH_ADDNODEBTN, self.OnAddNodeMenuBtn)
def Hot_Key_Down(self, event):
+ '''
+ 快捷键
+ '''
print('检测到快捷键:' + str(event.GetKeyCode()))
key = int(event.GetKeyCode())
@@ -262,9 +308,47 @@ def A_GRIDOnGridLabelLeftDClick(self, event):
event.Skip()
#C-------------------------------------------------------------------------
-
-
+ def C_Check(self,event):
+ name = self.C_PathBox.GetString(self.C_PathBox.GetSelections()[0])
+ try:
+ data = xlrd.open_workbook(name)
+ except:
+ self.C_Path.SetLabel('错误的文件')
+ else:
+ self.C_Path.SetLabel('文件路径:' + name)
+ table = data.sheets()[0]
+
+ self.NoteBook.ChangeSelection(2)
+ self.C_Class.SetLabel('班级:' + str(table.col_values(0, start_rowx=0, end_rowx=None)[0][0:2]))
+ self.C_NUM.SetLabel('总人数:' + str(len(table.col_values(0, start_rowx=0, end_rowx=None))))
+
+ fileinfo = os.stat(name)
+ self.C_ListBox.Clear()
+ self.C_ListBox.Append("索引号:" + str(fileinfo.st_ino))
+ self.C_ListBox.Append("驻留设备:" + str(fileinfo.st_dev))
+ self.C_ListBox.Append("文件大小:" + str(fileinfo.st_size) + "字节")
+ self.C_ListBox.Append("最后一次访问时间:" + str(formatTime(fileinfo.st_atime)))
+ self.C_ListBox.Append("最后一次修改时间:" + str(formatTime(fileinfo.st_mtime)))
+ self.C_ListBox.Append("最后一次状态变化的时间:" + str(formatTime(fileinfo.st_ctime)))
+ self.C_ListBox.Append("保护模式:" + str(fileinfo.st_mode))
+ self.C_ListBox.Append("节点号:" + str(fileinfo.st_ino))
+ self.C_ListBox.Append("连接数:" + str(fileinfo.st_nlink))
+ self.C_ListBox.Append("所有者ID:" + str(fileinfo.st_uid))
+ self.C_ListBox.Append("所有者组ID:" + str(fileinfo.st_gid))
+
+ def C_CheckDC(self, event):
+ return super().C_CheckDC(event)
+ #D----------------------------------------------------------------------
+
+ def OnAddNodeMenuBtn(self, event):
+ print("Open add node menu")
+
#Main----------------------------------------------------------------------
+ def NoteBookOnNotebookPageChanged(self,event):
+ if self.NoteBook.GetSelection() == 3:
+ print('初始化D')
+ self.D_init()
+
def MainOnSize(self, event):
'''
主界面->窗口大小调整
@@ -273,10 +357,7 @@ def MainOnSize(self, event):
size = self.GetSize()[0] / self.A_GRID.GetNumberCols() - 30
self.A_GRID.SetColSize(i,int(size))
-
- #self.ST_Line.Move(1,self.GetSize()[0] - 100)
- #self.NUM.Move(1,self.GetSize()[0] - 100)
-
+ ##self.A_GRID.SetSize(self.GetSize()[0],200)
event.Skip()
def Resize(self):
@@ -308,7 +389,7 @@ def __init__(self, window):
self.window = window
def OnDropFiles(self, x, y, filenames):
-
+
for name in filenames:
print(name)
@@ -316,85 +397,13 @@ def OnDropFiles(self, x, y, filenames):
end = int(len(name))
file_type = str(name)[font: end]
- print('文件类型:' + file_type)
-
- if len(filenames) > 1:
- print('警告:暂不支持多文件拖放,取最后一个文件')
-
-
- if file_type == 'xls':
- try:
- data = xlrd.open_workbook(filenames[0])
- except:
- window_frame.C_Path.SetLabel('错误的文件')
- else:
- window_frame.C_Path.SetLabel('文件路径:' + filenames[0])
- table = data.sheets()[0]
-
- window_frame.NoteBook.ChangeSelection(2)
- window_frame.C_Class.SetLabel('班级:' + str(table.col_values(0, start_rowx=0, end_rowx=None)[0][0:2]))
- window_frame.C_NUM.SetLabel('总人数:' + str(len(table.col_values(0, start_rowx=0, end_rowx=None))))
+ if file_type == 'xls':
+ if window_frame.C_PathBox.FindString(name) == -1: # 防止重复导入
+ window_frame.C_PathBox.Append(name)
+ window_frame.NoteBook.ChangeSelection(2)
- if table.ncols == 1:
- pass
else:
- for i in range(1,6):
- list = table.col_values(i, start_rowx=0, end_rowx=None)
- for i2 in range(0,list.count('')):
- list.remove('')
-
- if i == 1:
- window_frame.C_Col1.SetLabel('列A权重:' + str(len(list)))
- elif i == 2:
- window_frame.C_Col2.SetLabel('列B权重:' + str(len(list)))
- elif i == 3:
- window_frame.C_Col3.SetLabel('列C权重:' + str(len(list)))
- elif i == 4:
- window_frame.C_Col4.SetLabel('列D权重:' + str(len(list)))
- elif i == 5:
- window_frame.C_Col5.SetLabel('列E权重:' + str(len(list)))
-
- weight = 0
- for i in range(0,table.nrows):
- list = table.row_values(i, start_colx=0, end_colx=None)
- for i2 in range(0,list.count('')):
- list.remove('')
- if len(list) != 1:
- weight = weight + 1
-
- proportion = weight/(weight + table.nrows)
- P_size = int(100 * proportion)
-
- window_frame.C_Guage.SetValue(P_size)
- window_frame.C_L.SetLabel('有效数据:' + str(weight) + '/' + str(table.nrows))
- window_frame.C_R.SetLabel(str(P_size) + '%')
-
-
- fileinfo = os.stat(filenames[0])
- window_frame.C_ListBox.Append("索引号:" + str(fileinfo.st_ino))
- window_frame.C_ListBox.Append("驻留设备:" + str(fileinfo.st_dev))
- window_frame.C_ListBox.Append("文件大小:" + str(fileinfo.st_size) + "字节")
- window_frame.C_ListBox.Append("最后一次访问时间:" + str(formatTime(fileinfo.st_atime)))
- window_frame.C_ListBox.Append("最后一次修改时间:" + str(formatTime(fileinfo.st_mtime)))
- window_frame.C_ListBox.Append("最后一次状态变化的时间:" + str(formatTime(fileinfo.st_ctime)))
- window_frame.C_ListBox.Append("保护模式:" + str(fileinfo.st_mode))
- window_frame.C_ListBox.Append("节点号:" + str(fileinfo.st_ino))
- window_frame.C_ListBox.Append("连接数:" + str(fileinfo.st_nlink))
- window_frame.C_ListBox.Append("所有者ID:" + str(fileinfo.st_uid))
- window_frame.C_ListBox.Append("所有者组ID:" + str(fileinfo.st_gid))
-
-
- window_frame.Resize()
-
-
- #if table.col_values(0, start_rowx=0, end_rowx=None)[0][0:2] ==
- #table.col_values(colx, start_rowx=0, end_rowx=None
-
- #print(table.col_values(0, start_rowx=0, end_rowx=None)[0][0:2])
-
-
- else:
- wx.CallAfter(wx.MessageBox, '文件类型:' + file_type + '[不支持]' + '\n' + '强行加载可能会导致未知错误!', caption='文件处理')
+ wx.CallAfter(wx.MessageBox, '文件类型:' + file_type + '[不支持]' + '\n' + '强行加载可能会导致未知错误!', caption='文件处理')
return True
diff --git a/Main.py b/Main.py
index 0ac17f7..af62785 100644
--- a/Main.py
+++ b/Main.py
@@ -45,7 +45,7 @@
import M_File # 文件管理器
import M_QRcode # 二维码生成器
import M_BingWallPaper # 必应壁纸
-# import M_WxGL # 3D模块OpenGL
+##import M_WxGL # 3D模块OpenGL
import M_Trigonometric # 三角函数
import M_Draw # 画板
import M_SSC # 作业扫码登记系统
@@ -56,7 +56,7 @@
import Plug_in # 插件
import Probe # 探针
-# import P_PPT # PPT小工具
+##import P_PPT # PPT小工具
# 临时库
##import YOLO
@@ -65,11 +65,14 @@
import WeaterAPI # 天气API(缺乏通用性)
# RBS_Code
-import RBS_PLC
+##import RBS_PLC
# TheAlgorithms算法
-#import TheAlgorithms
-#from TheAlgorithms import *
+##import TheAlgorithms
+##from TheAlgorithms import *
+
+# 节点
+##import gsnodegraph
# 核心库
import wx
@@ -88,10 +91,11 @@
import PIL.Image
import ping3
import random # 随机数
-# import re # 正则表达式
-# import subprocess # 管线
+##import re # 正则表达式
+##import subprocess # 管线
import gc # 内存回收
-from ctypes import WinDLL # 运行Windows DLL
+import ctypes
+##from ctypes import WinDLL # 运行Windows DLL
import imghdr
###########################################################################
@@ -143,12 +147,16 @@ def __init__(self, parent):
self.Frame_Setting = Setting.CalcFrame(None)
self.Frame_Plug_in = Plug_in.CalcFrame(None)
self.Frame_Probe = Probe.CalcFrame(None)
-
# ------------------------------------------------------------
self.threads = [] # 预留给多线程
- gdi32 = WinDLL("gdi32.dll") # 调用此DLL载入字体
+ try:
+ ctypes.windll.shcore.SetProcessDpiAwareness(True) # DPI(未经测试!)
+ except Exception as error:
+ print(error)
+
+ gdi32 = ctypes.WinDLL("gdi32.dll") # 调用此DLL载入字体
fonts = [font for font in os.listdir(
"fonts") if font.endswith("otf") or font.endswith("ttf")]
for font in fonts:
@@ -161,33 +169,30 @@ def __init__(self, parent):
wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
# 为个别组件单独设置字体
- self.T_F1.SetFont(wx.Font(wx.Font(15, wx.FONTFAMILY_DEFAULT,
- wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC")))
- self.T_F2.SetFont(wx.Font(wx.Font(15, wx.FONTFAMILY_DEFAULT,
- wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC")))
- self.T_F3.SetFont(wx.Font(wx.Font(15, wx.FONTFAMILY_DEFAULT,
- wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC")))
- self.T_F4.SetFont(wx.Font(wx.Font(15, wx.FONTFAMILY_DEFAULT,
- wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC")))
-
- # ↓↓↓↓↓ 定义全局变量 ↓↓↓↓↓
- global Main_State, FUN_State, version, setup, Colour_G, Hover, colour_Hover, cfg
- cfg = configparser.ConfigParser() # 读取设置文件
-
- cfg.read('./cfg/main.cfg')
- transparent = cfg.get('window', 'transparency')
- is_push_info = cfg.get('window', 'is_push_info')
- is_round = cfg.get('window', 'is_round')
- version = cfg.get('main', 'VERSION')
- Is_complete = cfg.get('Check', 'Is_complete')
-
- Main_State = 0
-
- Log() # 初始化LOG设置
- logging.info('Document integrity check文件完整性检查:' + Is_complete)
-
- self.Self_CMD('载入设置完成') # 向自定义控制台发送消息
- self.Self_CMD('文件完整性检查:' + Is_complete)
+ self.T_F1.SetFont(wx.Font(15, wx.FONTFAMILY_DEFAULT,
+ wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
+ self.T_F2.SetFont(wx.Font(15, wx.FONTFAMILY_DEFAULT,
+ wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
+ self.T_F3.SetFont(wx.Font(15, wx.FONTFAMILY_DEFAULT,
+ wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
+ self.T_F4.SetFont(wx.Font(15, wx.FONTFAMILY_DEFAULT,
+ wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
+
+ self.CMD_OUT.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT,
+ wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
+ self.CMD_IN.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT,
+ wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
+ self.Bottom_Bar4.SetFont(wx.Font(8, wx.FONTFAMILY_DEFAULT,
+ wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL, False, "HarmonyOS Sans SC"))
+ # ↓↓↓↓↓ 载入类变量 ↓↓↓↓↓
+ self.cfg = configparser.ConfigParser() # 读取设置文件
+
+ self.cfg.read('./cfg/main.cfg')
+ transparent = self.cfg.get('window', 'transparency') # 透明度
+ is_push_info = self.cfg.get('window', 'is_push_info') # 通知栏
+ is_round = self.cfg.get('window', 'is_round') # 圆形边角
+ version = self.cfg.get('main', 'VERSION') # 版本号
+ Is_complete = self.cfg.get('Check', 'Is_complete') # 启动检测是否运行
# 载入插件-----------------------
Plug_in_list = open('./DATA/main/plug_in/List.txt')
@@ -196,11 +201,12 @@ def __init__(self, parent):
self.Plug_in_box.Append(str(Plug_in_list[i]).replace('\n', ''))
print('载入插件', str(Plug_in_list[i]).replace('\n', ''))
# ------------------------------
- setup = 0 # 初始化操作所用的变量,所有操作完成后会变成1
- FUN_State = -1
- Hover = 0 # 检测当前Hover的按钮是哪个
- colour_Hover = '#A65F00' # 顶部按钮被Hover时呈现的颜色
- Colour_G = '#cccccc' # 分区按钮Hover时呈现的颜色
+ self.Main_State = 0
+ self.setup = 0 # 初始化操作所用的变量,所有操作完成后会变成1
+ self.FUN_State = -1
+ self.Hover = 0 # 检测当前Hover的按钮是哪个
+ self.colour_Hover = '#A65F00' # 顶部按钮被Hover时呈现的颜色
+ self.Colour_G = '#cccccc' # 分区按钮Hover时呈现的颜色
# ------------------------------ 主界面初始化操作,设置文本常量,颜色值,按钮呈现等
@@ -231,12 +237,17 @@ def __init__(self, parent):
self.SetTransparent(int(transparent)) # 设置窗口透明度
# self.SetCursor(wx.Cursor(6)) # 设置窗口光标
+ self.Raise() # 将窗口提升至顶出现
# ------------------------------------------------------
# 初始化完成后日志输出
+ Log() # 初始化LOG设置
+ logging.info('Document integrity check文件完整性检查:' + Is_complete)
logging.info(str('Initialization complete初始化完成:'))
logging.info('Version软件版本:' + version)
+ self.Self_CMD('载入设置完成') # 向自定义控制台发送消息
+ self.Self_CMD('文件完整性检查:' + Is_complete)
self.Self_CMD('初始化完成,日志已保存')
if eval(is_push_info):
@@ -257,7 +268,7 @@ def Sacc(self, event):
"""
主界面背景图片绘制
"""
- if setup == 1:
+ if self.setup == 1:
dc = event.GetDC()
dc.Clear()
dc.DrawBitmap(wx.Bitmap('./pictures/BG.jpg'), 0, 50, useMask=True)
@@ -284,7 +295,7 @@ def Close(self, event):
# 关闭程序
wx.CallAfter(sys.exit, 0)
- def Quit(self, event):
+ def Quit(self, *event):
"""
self_关闭程序
"""
@@ -293,8 +304,11 @@ def Quit(self, event):
thread.timeToQuit.set()
self.threads.remove(thread)
- if self.taskBar.IsAvailable: # 移除托盘图标
- self.taskBar.RemoveIcon()
+ if self.IsShown() == True:
+ pass
+ else:
+ self.taskBar.RemoveIcon()# 移除托盘图标
+ self.taskBar.Destroy()
# 日志输出
logging.info(str('self quit'))
@@ -306,7 +320,7 @@ def Quit(self, event):
self.PRO_Timer.Stop()
self.Time_Timer.Stop()
- gdi32 = WinDLL("gdi32.dll") # 调用此DLL卸载字体
+ gdi32 = ctypes.WinDLL("gdi32.dll") # 调用此DLL卸载字体
fonts = [font for font in os.listdir(
"fonts") if font.endswith("otf") or font.endswith("ttf")]
for font in fonts:
@@ -318,7 +332,7 @@ def Quit(self, event):
# self.HideWithEffect(wx.SHOW_EFFECT_BLEND)
wx.CallAfter(sys.exit, 0)
- def Ico(self, event):
+ def Ico(self, *event):
"""
窗口最小化-事件触发
"""
@@ -415,6 +429,7 @@ def OnTaskBarLeftDClick(self, event):
if not self.IsShown(): # 判断窗口是否隐藏
self.Show(True) # 显示窗口
self.Raise() # 将窗口提升到顶层
+ self.taskBar.RemoveIcon()
def Cmd(self, event):
# 向控制台发送命令
@@ -502,13 +517,13 @@ def GetWeather(self, event):
print('获取天气信息...')
self.Weather.Enable(True)
- def CMD_Enter(self, event):
+ def CMD_INOnTextEnter(self,event):
if self.CMD_IN.GetValue() != "":
self.CMD(self.CMD_IN.GetValue())
self.CMD_IN.SetValue('')
def move_start(self, frame_pos):
- # print(frame_pos)
+ ##print(frame_pos)
self.SetPosition(frame_pos)
def OnLeftDown(self, event):
@@ -521,12 +536,16 @@ def OnLeftUp(self, event):
self.threads[0].timeToQuit.set()
self.threads.remove(self.threads[0])
- # print('退出线程')
+ ##print('退出线程')
def Change_Size(self, event):
print(self.GetSize())
event.Skip()
+ def OnRightDown(self, event):
+ self.PopupMenu(MyPopupMenu(self),event.GetPosition())
+ ##return super().OnRightDown(event)
+
def Plug_in_refresh(self, event):
self.Plug_in_box.Clear()
Plug_in_list = open('./DATA/main/plug_in/List.txt')
@@ -540,8 +559,8 @@ def Plug_in_run(self, event):
self.Plug_in_box.GetString(self.Plug_in_box.GetSelection())
print(path)
- cfg.read(path + '/Info.cfg', encoding='utf-8')
- entrance = cfg.get('main', 'ENTRANCE')
+ self.cfg.read(path + '/Info.cfg', encoding='utf-8')
+ entrance = self.cfg.get('main', 'ENTRANCE')
path = os.path.abspath(path + '/' + entrance)
@@ -676,218 +695,193 @@ def Hover1(self, event):
""" 光标经过,接触到按钮时(功能按钮),改变提示标签文本 """
self.Bottom_Bar1.SetLabel('Function1')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 11
+ self.Hover = 11
def Hover2(self, event):
self.Bottom_Bar1.SetLabel('Function2')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 12
+ self.Hover = 12
def Hover3(self, event):
self.Bottom_Bar1.SetLabel('Function3')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 13
+ self.Hover = 13
def Hover4(self, event):
self.Bottom_Bar1.SetLabel('Function4')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 14
+ self.Hover = 14
def Hover_L1(self, event):
- self.Side1.SetBackgroundColour(colour_Hover)
+ self.Side1.SetBackgroundColour(self.colour_Hover)
self.Bottom_Bar1.SetLabel('Back to HOME')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 41
+ self.Hover = 41
def Hover_L2(self, event):
- self.Side2.SetBackgroundColour(colour_Hover)
+ self.Side2.SetBackgroundColour(self.colour_Hover)
self.Bottom_Bar1.SetLabel('check the plug-in')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 42
+ self.Hover = 42
def Hover_L3(self, event):
- self.Side3.SetBackgroundColour(colour_Hover)
+ self.Side3.SetBackgroundColour(self.colour_Hover)
self.Bottom_Bar1.SetLabel('login as user')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 43
+ self.Hover = 43
def Hover_L4(self, event):
- self.Side4.SetBackgroundColour(colour_Hover)
+ self.Side4.SetBackgroundColour(self.colour_Hover)
self.Bottom_Bar1.SetLabel('Background service program')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 44
+ self.Hover = 44
def H_LOG(self, event):
""" 顶部功能按钮提示 """
self.Bottom_Bar1.SetLabel('update log')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 31
+ self.Hover = 31
- self.B_Log.SetBackgroundColour(colour_Hover)
+ self.B_Log.SetBackgroundColour(self.colour_Hover)
def H_SET(self, event):
self.Bottom_Bar1.SetLabel('software setting')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 32
+ self.Hover = 32
- self.B_Setting.SetBackgroundColour(colour_Hover)
+ self.B_Setting.SetBackgroundColour(self.colour_Hover)
def H_ABO(self, event):
self.Bottom_Bar1.SetLabel('About us')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 33
+ self.Hover = 33
- self.B_About.SetBackgroundColour(colour_Hover)
+ self.B_About.SetBackgroundColour(self.colour_Hover)
def H_CMD(self, event):
self.Bottom_Bar1.SetLabel('open cmd on windows')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 34
+ self.Hover = 34
- self.B_Cmd.SetBackgroundColour(colour_Hover)
+ self.B_Cmd.SetBackgroundColour(self.colour_Hover)
def H_UPD(self, event):
self.Bottom_Bar1.SetLabel('check to update online')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 35
+ self.Hover = 35
- self.B_Update.SetBackgroundColour(colour_Hover)
+ self.B_Update.SetBackgroundColour(self.colour_Hover)
def H_QUT(self, event):
self.Bottom_Bar1.SetLabel('quit/end the software')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 36
+ self.Hover = 36
- self.B_Quit.SetBackgroundColour(colour_Hover)
+ self.B_Quit.SetBackgroundColour(self.colour_Hover)
def H_File(self, event):
self.Bottom_Bar1.SetLabel('File manager')
self.SetCursor(wx.Cursor(6))
- global Hover
- Hover = 37
+ self.Hover = 37
- self.B_File.SetBackgroundColour(colour_Hover)
+ self.B_File.SetBackgroundColour(self.colour_Hover)
def Class1(self, event):
""" 光标经过,接触到按钮(分区按钮)时,改变提示标签文本 """
self.Bottom_Bar1.SetLabel(str('功能分区1--' + self.G1.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 1:
+ if self.Main_State == 1:
event.Skip()
else:
- self.G1.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 21
+ self.G1.SetBackgroundColour(self.Colour_G)
+ self.Hover = 21
def Class2(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区2--' + self.G2.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 2:
+ if self.Main_State == 2:
event.Skip()
else:
- self.G2.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 22
+ self.G2.SetBackgroundColour(self.Colour_G)
+ self.Hover = 22
def Class3(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区3--' + self.G3.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 3:
+ if self.Main_State == 3:
event.Skip()
else:
- self.G3.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 23
+ self.G3.SetBackgroundColour(self.Colour_G)
+ self.Hover = 23
def Class4(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区4--' + self.G4.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 4:
+ if self.Main_State == 4:
event.Skip()
else:
- self.G4.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 24
+ self.G4.SetBackgroundColour(self.Colour_G)
+ self.Hover = 24
def Class5(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区5--' + self.G5.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 5:
+ if self.Main_State == 5:
event.Skip()
else:
- self.G5.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 25
+ self.G5.SetBackgroundColour(self.Colour_G)
+ self.Hover = 25
def Class6(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区6--' + self.G6.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 6:
+ if self.Main_State == 6:
event.Skip()
else:
- self.G6.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 26
+ self.G6.SetBackgroundColour(self.Colour_G)
+ self.Hover = 26
def Class7(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区7--' + self.G7.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 7:
+ if self.Main_State == 7:
event.Skip()
else:
- self.G7.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 27
+ self.G7.SetBackgroundColour(self.Colour_G)
+ self.Hover = 27
def Class8(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区8--' + self.G8.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 8:
+ if self.Main_State == 8:
event.Skip()
else:
- self.G8.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 28
+ self.G8.SetBackgroundColour(self.Colour_G)
+ self.Hover = 28
def Class9(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区9--' + self.G9.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 9:
+ if self.Main_State == 9:
event.Skip()
else:
- self.G9.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 29
+ self.G9.SetBackgroundColour(self.Colour_G)
+ self.Hover = 29
def Class10(self, event):
self.Bottom_Bar1.SetLabel(str('功能分区10--' + self.G10.GetLabel()))
self.SetCursor(wx.Cursor(6))
- if Main_State == 10:
+ if self.Main_State == 10:
event.Skip()
else:
- self.G10.SetBackgroundColour(Colour_G)
- global Hover
- Hover = 210
+ self.G10.SetBackgroundColour(self.Colour_G)
+ self.Hover = 210
def H_BT2(self, event):
- self.Bottom_Bar2.SetBackgroundColour(colour_Hover)
+ self.Bottom_Bar2.SetBackgroundColour(self.colour_Hover)
def H_BT3(self, event):
- self.Bottom_Bar3.SetBackgroundColour(colour_Hover)
+ self.Bottom_Bar3.SetBackgroundColour(self.colour_Hover)
# ---------------------------------------------------------------------
@@ -900,7 +894,7 @@ def Leave1(self, event):
""" 光标离开,不接触按钮时,改变提示标签文本 """
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 1:
+ if self.Main_State == 1:
event.Skip()
else:
self.G1.SetBackgroundColour('white')
@@ -909,7 +903,7 @@ def Leave1(self, event):
def Leave2(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 2:
+ if self.Main_State == 2:
event.Skip()
else:
self.G2.SetBackgroundColour('white')
@@ -918,7 +912,7 @@ def Leave2(self, event):
def Leave3(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 3:
+ if self.Main_State == 3:
event.Skip()
else:
self.G3.SetBackgroundColour('white')
@@ -927,7 +921,7 @@ def Leave3(self, event):
def Leave4(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 4:
+ if self.Main_State == 4:
event.Skip()
else:
self.G4.SetBackgroundColour('white')
@@ -936,7 +930,7 @@ def Leave4(self, event):
def Leave5(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 5:
+ if self.Main_State == 5:
event.Skip()
else:
self.G5.SetBackgroundColour('white')
@@ -945,7 +939,7 @@ def Leave5(self, event):
def Leave6(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 6:
+ if self.Main_State == 6:
event.Skip()
else:
self.G6.SetBackgroundColour('white')
@@ -954,7 +948,7 @@ def Leave6(self, event):
def Leave7(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 7:
+ if self.Main_State == 7:
event.Skip()
else:
self.G7.SetBackgroundColour('white')
@@ -963,7 +957,7 @@ def Leave7(self, event):
def Leave8(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 8:
+ if self.Main_State == 8:
event.Skip()
else:
self.G8.SetBackgroundColour('white')
@@ -972,7 +966,7 @@ def Leave8(self, event):
def Leave9(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 9:
+ if self.Main_State == 9:
event.Skip()
else:
self.G9.SetBackgroundColour('white')
@@ -981,26 +975,26 @@ def Leave9(self, event):
def Leave10(self, event):
self.Bottom_Bar1.SetLabel('Get focus to show prompts')
self.SetCursor(wx.Cursor(1))
- if Main_State == 10:
+ if self.Main_State == 10:
event.Skip()
else:
self.G10.SetBackgroundColour('white')
self.G10.SetForegroundColour('black')
def Leave_L1(self, event):
- self.Side1.SetBackgroundColour(colour_SideL)
+ self.Side1.SetBackgroundColour(self.colour_SideL)
self.SetCursor(wx.Cursor(1))
def Leave_L2(self, event):
- self.Side2.SetBackgroundColour(colour_SideL)
+ self.Side2.SetBackgroundColour(self.colour_SideL)
self.SetCursor(wx.Cursor(1))
def Leave_L3(self, event):
- self.Side3.SetBackgroundColour(colour_SideL)
+ self.Side3.SetBackgroundColour(self.colour_SideL)
self.SetCursor(wx.Cursor(1))
def Leave_L4(self, event):
- self.Side4.SetBackgroundColour(colour_SideL)
+ self.Side4.SetBackgroundColour(self.colour_SideL)
self.SetCursor(wx.Cursor(1))
def L_LOG(self, event):
@@ -1053,10 +1047,9 @@ def L_BT3(self, event):
def Function1(self, event):
""" 点击事件_按钮1 """
- global FUN_State
- FUN_State = 1
+ self.FUN_State = 1
- if Main_State == 1:
+ if self.Main_State == 1:
self.Frame_Pinyin.Bind(wx.EVT_CLOSE, self.Function_11)
if self.Frame_Pinyin.IsShown():
@@ -1070,7 +1063,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 2:
+ elif self.Main_State == 2:
self.Frame_Pi.Bind(wx.EVT_CLOSE, self.Function_12)
if self.Frame_Pi.IsShown():
@@ -1084,7 +1077,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 3:
+ elif self.Main_State == 3:
self.Frame_Capslook.Bind(wx.EVT_CLOSE, self.Function_13)
if self.Frame_Capslook.IsShown():
@@ -1098,7 +1091,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 4:
+ elif self.Main_State == 4:
self.Frame_SSC.Bind(wx.EVT_CLOSE, self.Function_14)
if self.Frame_SSC.IsShown():
@@ -1112,7 +1105,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 5:
+ elif self.Main_State == 5:
self.Frame_History.Bind(wx.EVT_CLOSE, self.Function_15)
if self.Frame_History.IsShown():
@@ -1126,7 +1119,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 6:
+ elif self.Main_State == 6:
self.Frame_WALP.Bind(wx.EVT_CLOSE, self.Function_16)
if self.Frame_WALP.IsShown():
@@ -1140,7 +1133,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 7:
+ elif self.Main_State == 7:
self.Frame_Music.Bind(wx.EVT_CLOSE, self.Function_17)
if self.Frame_Music.IsShown():
@@ -1154,7 +1147,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 8:
+ elif self.Main_State == 8:
self.Frame_Element.Bind(wx.EVT_CLOSE, self.Function_18)
if self.Frame_Element.IsShown():
@@ -1168,7 +1161,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 9:
+ elif self.Main_State == 9:
self.Frame_Gene.Bind(wx.EVT_CLOSE, self.Function_19)
if self.Frame_Gene.IsShown():
@@ -1182,7 +1175,7 @@ def Function1(self, event):
self.B_F1.SetLabel('正在运行中~')
self.B_F1.SetForegroundColour('white')
- elif Main_State == 10:
+ elif self.Main_State == 10:
self.Frame_Roll.Bind(wx.EVT_CLOSE, self.Function_110)
if self.Frame_Roll.IsShown():
@@ -1198,10 +1191,9 @@ def Function1(self, event):
def Function2(self, event):
""" 点击事件_按钮2 """
- global FUN_State
- FUN_State = 2
+ self.FUN_State = 2
- if Main_State == 1:
+ if self.Main_State == 1:
self.Frame_Traditional_Chinese.Bind(wx.EVT_CLOSE, self.Function_21)
if self.Frame_Traditional_Chinese.IsShown():
@@ -1215,12 +1207,12 @@ def Function2(self, event):
self.B_F2.SetLabel('正在运行中~')
self.B_F2.SetForegroundColour('white')
- elif Main_State == 2:
+ elif self.Main_State == 2:
wx.MessageBox('未启用,敬请期待!', '提示', wx.OK)
return
- elif Main_State == 3:
+ elif self.Main_State == 3:
return
- elif Main_State == 4:
+ elif self.Main_State == 4:
self.Frame_PPTNG.Bind(wx.EVT_CLOSE, self.Function_24)
if self.Frame_PPTNG.IsShown():
@@ -1234,7 +1226,7 @@ def Function2(self, event):
self.B_F2.SetLabel('正在运行中~')
self.B_F2.SetForegroundColour('white')
- elif Main_State == 5:
+ elif self.Main_State == 5:
self.Frame_BingWallPaper.Bind(wx.EVT_CLOSE, self.Function_25)
if self.Frame_BingWallPaper.IsShown():
@@ -1248,9 +1240,9 @@ def Function2(self, event):
self.B_F2.SetLabel('正在运行中~')
self.B_F2.SetForegroundColour('white')
- elif Main_State == 6:
+ elif self.Main_State == 6:
return
- elif Main_State == 7:
+ elif self.Main_State == 7:
self.Frame_College.Bind(wx.EVT_CLOSE, self.Function_27)
if self.Frame_College.IsShown():
@@ -1264,11 +1256,11 @@ def Function2(self, event):
self.B_F2.SetLabel('正在运行中~')
self.B_F2.SetForegroundColour('white')
- elif Main_State == 8:
+ elif self.Main_State == 8:
return
- elif Main_State == 9:
+ elif self.Main_State == 9:
return
- elif Main_State == 10:
+ elif self.Main_State == 10:
self.Frame_Base_conversion.Bind(wx.EVT_CLOSE, self.Function_210)
if self.Frame_Base_conversion.IsShown():
@@ -1284,10 +1276,9 @@ def Function2(self, event):
def Function3(self, event):
""" 点击事件_按钮3 """
- global FUN_State
- FUN_State = 3
+ self.FUN_State = 3
- if Main_State == 1:
+ if self.Main_State == 1:
self.Frame_Idion.Bind(wx.EVT_CLOSE, self.Function_31)
if self.Frame_Idion.IsShown():
@@ -1301,7 +1292,7 @@ def Function3(self, event):
self.B_F3.SetLabel('正在运行中~')
self.B_F3.SetForegroundColour('white')
- elif Main_State == 2:
+ elif self.Main_State == 2:
self.Frame_Trigonometric.Bind(wx.EVT_CLOSE, self.Function_32)
if self.Frame_Trigonometric.IsShown():
@@ -1315,9 +1306,9 @@ def Function3(self, event):
self.B_F3.SetLabel('正在运行中~')
self.B_F3.SetForegroundColour('white')
- elif Main_State == 3:
+ elif self.Main_State == 3:
return
- elif Main_State == 4:
+ elif self.Main_State == 4:
self.Frame_BMI.Bind(wx.EVT_CLOSE, self.Function_34)
if self.Frame_BMI.IsShown():
@@ -1331,11 +1322,11 @@ def Function3(self, event):
self.B_F3.SetLabel('正在运行中~')
self.B_F3.SetForegroundColour('white')
- elif Main_State == 5:
+ elif self.Main_State == 5:
return
- elif Main_State == 6:
+ elif self.Main_State == 6:
return
- elif Main_State == 7:
+ elif self.Main_State == 7:
self.Frame_QRcode.Bind(wx.EVT_CLOSE, self.Function_37)
if self.Frame_QRcode.IsShown():
@@ -1349,11 +1340,11 @@ def Function3(self, event):
self.B_F3.SetLabel('正在运行中~')
self.B_F3.SetForegroundColour('white')
- elif Main_State == 8:
+ elif self.Main_State == 8:
return
- elif Main_State == 9:
+ elif self.Main_State == 9:
return
- elif Main_State == 10:
+ elif self.Main_State == 10:
self.Frame_Roster.Bind(wx.EVT_CLOSE, self.Function_310)
if self.Frame_Roster.IsShown():
@@ -1369,11 +1360,10 @@ def Function3(self, event):
def Function4(self, event):
""" 点击事件_按钮4 """
- global FUN_State
- FUN_State = 4
- if Main_State == 1:
+ self.FUN_State = 4
+ if self.Main_State == 1:
return
- elif Main_State == 2:
+ elif self.Main_State == 2:
self.Frame_Draw.Bind(wx.EVT_CLOSE, self.Function_42)
if self.Frame_Draw.IsShown():
@@ -1387,9 +1377,9 @@ def Function4(self, event):
self.B_F4.SetLabel('正在运行中~')
self.B_F4.SetForegroundColour('white')
- elif Main_State == 3:
+ elif self.Main_State == 3:
return
- elif Main_State == 4:
+ elif self.Main_State == 4:
self.Frame_DDT.Bind(wx.EVT_CLOSE, self.Function_44)
if self.Frame_DDT.IsShown():
@@ -1403,17 +1393,17 @@ def Function4(self, event):
self.B_F4.SetLabel('正在运行中~')
self.B_F4.SetForegroundColour('white')
- elif Main_State == 5:
+ elif self.Main_State == 5:
return
- elif Main_State == 6:
+ elif self.Main_State == 6:
return
- elif Main_State == 7:
+ elif self.Main_State == 7:
return
- elif Main_State == 8:
+ elif self.Main_State == 8:
return
- elif Main_State == 9:
+ elif self.Main_State == 9:
return
- elif Main_State == 10:
+ elif self.Main_State == 10:
self.Frame_Timer.Bind(wx.EVT_CLOSE, self.Function_410)
if self.Frame_Timer.IsShown():
@@ -1428,7 +1418,7 @@ def Function4(self, event):
self.B_F4.SetForegroundColour('white')
def Function_11(self, event):
- if Main_State == 1:
+ if self.Main_State == 1:
self.Frame_Pinyin.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1437,7 +1427,7 @@ def Function_11(self, event):
self.Frame_Pinyin.Hide()
def Function_12(self, event):
- if Main_State == 2:
+ if self.Main_State == 2:
self.Frame_Pi.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1446,7 +1436,7 @@ def Function_12(self, event):
self.Frame_Pi.Hide()
def Function_13(self, event):
- if Main_State == 3:
+ if self.Main_State == 3:
self.Frame_Capslook.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1455,7 +1445,7 @@ def Function_13(self, event):
self.Frame_Capslook.Hide()
def Function_14(self, event):
- if Main_State == 4:
+ if self.Main_State == 4:
self.Frame_SSC.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1464,7 +1454,7 @@ def Function_14(self, event):
self.Frame_SSC.Hide()
def Function_15(self, event):
- if Main_State == 5:
+ if self.Main_State == 5:
self.Frame_History.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1473,7 +1463,7 @@ def Function_15(self, event):
self.Frame_History.Hide()
def Function_16(self, event):
- if Main_State == 6:
+ if self.Main_State == 6:
self.Frame_WALP.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1482,7 +1472,7 @@ def Function_16(self, event):
self.Frame_WALP.Hide()
def Function_17(self, event):
- if Main_State == 7:
+ if self.Main_State == 7:
self.Frame_Music.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1491,7 +1481,7 @@ def Function_17(self, event):
self.Frame_Music.Hide()
def Function_18(self, event):
- if Main_State == 8:
+ if self.Main_State == 8:
self.Frame_Element.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1500,7 +1490,7 @@ def Function_18(self, event):
self.Frame_Element.Hide()
def Function_19(self, event):
- if Main_State == 9:
+ if self.Main_State == 9:
self.Frame_Gene.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1509,7 +1499,7 @@ def Function_19(self, event):
self.Frame_Gene.Hide()
def Function_110(self, event):
- if Main_State == 10:
+ if self.Main_State == 10:
self.Frame_Roll.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1518,7 +1508,7 @@ def Function_110(self, event):
self.Frame_Roll.Hide()
def Function_21(self, event):
- if Main_State == 1:
+ if self.Main_State == 1:
self.Frame_Traditional_Chinese.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1529,7 +1519,7 @@ def Function_21(self, event):
def Function_22(self, event):
pass
'''
- if Main_State == 2:
+ if self.Main_State == 2:
Frame_Roll.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1541,7 +1531,7 @@ def Function_22(self, event):
def Function_23(self, event):
pass
'''
- if Main_State == 3:
+ if self.Main_State == 3:
Frame_Roll.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1551,7 +1541,7 @@ def Function_23(self, event):
'''
def Function_24(self, event):
- if Main_State == 4:
+ if self.Main_State == 4:
self.Frame_PPTNG.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1560,7 +1550,7 @@ def Function_24(self, event):
self.Frame_PPTNG.Hide()
def Function_25(self, event):
- if Main_State == 5:
+ if self.Main_State == 5:
self.Frame_BingWallPaper.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1571,7 +1561,7 @@ def Function_25(self, event):
def Function_26(self, event):
pass
'''
- if Main_State == 6:
+ if self.Main_State == 6:
Frame_Roll.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1581,7 +1571,7 @@ def Function_26(self, event):
'''
def Function_27(self, event):
- if Main_State == 7:
+ if self.Main_State == 7:
self.Frame_College.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1592,7 +1582,7 @@ def Function_27(self, event):
def Function_28(self, event):
pass
'''
- if Main_State == 8:
+ if self.Main_State == 8:
Frame_Roll.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1604,7 +1594,7 @@ def Function_28(self, event):
def Function_29(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Roll.Hide()
self.B_F1.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F1.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1614,7 +1604,7 @@ def Function_29(self, event):
'''
def Function_210(self, event):
- if Main_State == 10:
+ if self.Main_State == 10:
self.Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1623,7 +1613,7 @@ def Function_210(self, event):
self.Frame_Base_conversion.Hide()
def Function_31(self, event):
- if Main_State == 1:
+ if self.Main_State == 1:
self.Frame_Idion.Hide()
self.B_F3.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F3.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1632,7 +1622,7 @@ def Function_31(self, event):
self.Frame_Idion.Hide()
def Function_32(self, event):
- if Main_State == 2:
+ if self.Main_State == 2:
self.Frame_Trigonometric.Hide()
self.B_F3.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F3.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1643,7 +1633,7 @@ def Function_32(self, event):
def Function_33(self, event):
pass
'''
- if Main_State == 3:
+ if self.Main_State == 3:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1653,7 +1643,7 @@ def Function_33(self, event):
'''
def Function_34(self, event):
- if Main_State == 4:
+ if self.Main_State == 4:
self.Frame_BMI.Hide()
self.B_F3.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F3.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1664,7 +1654,7 @@ def Function_34(self, event):
def Function_35(self, event):
pass
'''
- if Main_State == 5:
+ if self.Main_State == 5:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1676,7 +1666,7 @@ def Function_35(self, event):
def Function_36(self, event):
pass
'''
- if Main_State == 6:
+ if self.Main_State == 6:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1686,7 +1676,7 @@ def Function_36(self, event):
'''
def Function_37(self, event):
- if Main_State == 7:
+ if self.Main_State == 7:
self.Frame_QRcode.Hide()
self.B_F3.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F3.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1697,7 +1687,7 @@ def Function_37(self, event):
def Function_38(self, event):
pass
'''
- if Main_State == 8:
+ if self.Main_State == 8:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1709,7 +1699,7 @@ def Function_38(self, event):
def Function_39(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1719,7 +1709,7 @@ def Function_39(self, event):
'''
def Function_310(self, event):
- if Main_State == 10:
+ if self.Main_State == 10:
self.Frame_Roster.Hide()
self.B_F3.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F3.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1730,7 +1720,7 @@ def Function_310(self, event):
def Function_41(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1740,7 +1730,7 @@ def Function_41(self, event):
'''
def Function_42(self, event):
- if Main_State == 2:
+ if self.Main_State == 2:
self.Frame_Draw.Hide()
self.B_F4.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F4.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1751,7 +1741,7 @@ def Function_42(self, event):
def Function_43(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1761,7 +1751,7 @@ def Function_43(self, event):
'''
def Function_44(self, event):
- if Main_State == 4:
+ if self.Main_State == 4:
self.Frame_DDT.Hide()
self.B_F4.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F4.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1772,7 +1762,7 @@ def Function_44(self, event):
def Function_45(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1784,7 +1774,7 @@ def Function_45(self, event):
def Function_46(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1796,7 +1786,7 @@ def Function_46(self, event):
def Function_47(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1808,7 +1798,7 @@ def Function_47(self, event):
def Function_48(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1820,7 +1810,7 @@ def Function_48(self, event):
def Function_49(self, event):
pass
'''
- if Main_State == 9:
+ if self.Main_State == 9:
Frame_Base_conversion.Hide()
self.B_F2.SetBackgroundColour(wx.Colour(192,192,192))
self.B_F2.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1830,7 +1820,7 @@ def Function_49(self, event):
'''
def Function_410(self, event):
- if Main_State == 10:
+ if self.Main_State == 10:
self.Frame_Timer.Hide()
self.B_F4.SetBackgroundColour(wx.Colour(192, 192, 192))
self.B_F4.SetLabel('<( ̄︶ ̄)↗[GO!]')
@@ -1842,9 +1832,7 @@ def Function_410(self, event):
def G_1(self, event):
""" 1号功能分区-语文 """
-
- global Main_State, colour_Hover, colour_SideL # 定义(全局)状态变量
- Main_State = 1
+ self.Main_State = 1
self.Colour_clean() # 清空所有颜色
@@ -1853,9 +1841,9 @@ def G_1(self, event):
colour_cfg = configparser.ConfigParser() # 主界面颜色定义
colour_cfg.read('./DATA/Main/Theme/colourful/Page1.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note1.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -1864,8 +1852,7 @@ def G_1(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom,
- colour_SideL) # 主界面颜色设置
+ self.Colour_Set(note, colour_Main, self.colour_Bottom,self.colour_SideL) # 主界面颜色设置
self.G1.SetBackgroundColour(colour_Main) # 主界面颜色设置
self.G1.SetForegroundColour("White") # 按钮字体颜色设置
@@ -1894,8 +1881,7 @@ def G_1(self, event):
def G_2(self, event):
""" 2号功能分区-数学 """
- global Main_State, colour_Hover, colour_SideL
- Main_State = 2
+ self.Main_State = 2
self.Colour_clean()
@@ -1904,9 +1890,9 @@ def G_2(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page2.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note2.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -1915,7 +1901,7 @@ def G_2(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G2.SetBackgroundColour(colour_Main)
self.G2.SetForegroundColour("White")
@@ -1943,9 +1929,7 @@ def G_2(self, event):
def G_3(self, event):
""" 3号功能分区-英语 """
-
- global Main_State, colour_Hover, colour_SideL
- Main_State = 3
+ self.Main_State = 3
self.Colour_clean()
@@ -1954,9 +1938,9 @@ def G_3(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page3.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note3.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -1965,7 +1949,7 @@ def G_3(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G3.SetBackgroundColour(colour_Main)
self.G3.SetForegroundColour("White")
@@ -1993,9 +1977,7 @@ def G_3(self, event):
def G_4(self, event):
""" 4号功能分区-信息 """
-
- global Main_State, colour_Hover, colour_SideL
- Main_State = 4
+ self.Main_State = 4
self.Colour_clean()
@@ -2004,9 +1986,9 @@ def G_4(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page4.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note4.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -2015,7 +1997,7 @@ def G_4(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G4.SetBackgroundColour(colour_Main)
self.G4.SetForegroundColour("White")
@@ -2043,9 +2025,7 @@ def G_4(self, event):
def G_5(self, event):
""" 5号功能分区-历史 """
-
- global Main_State, colour_Hover, colour_SideL
- Main_State = 5
+ self.Main_State = 5
self.Colour_clean()
@@ -2054,9 +2034,9 @@ def G_5(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page5.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note5.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -2065,7 +2045,7 @@ def G_5(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G5.SetBackgroundColour(colour_Main)
self.G5.SetForegroundColour("White")
@@ -2093,8 +2073,7 @@ def G_5(self, event):
def G_6(self, event):
""" 6号功能分区-地理 """
- global Main_State, colour_Hover, colour_SideL
- Main_State = 6
+ self.Main_State = 6
self.Colour_clean()
@@ -2103,9 +2082,9 @@ def G_6(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page6.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note6.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -2114,7 +2093,7 @@ def G_6(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G6.SetBackgroundColour(colour_Main)
self.G6.SetForegroundColour("White")
@@ -2142,8 +2121,7 @@ def G_6(self, event):
def G_7(self, event):
""" 7号功能分区-物理 """
- global Main_State, colour_Hover, colour_SideL
- Main_State = 7
+ self.Main_State = 7
self.Colour_clean()
@@ -2152,9 +2130,9 @@ def G_7(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page7.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note7.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -2163,7 +2141,7 @@ def G_7(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G7.SetBackgroundColour(colour_Main)
self.G7.SetForegroundColour("White")
@@ -2176,7 +2154,7 @@ def G_7(self, event):
self.Tip1.SetLabel('对于音频的可视化分析')
self.Tip2.SetLabel('临时模块-数据库已完成20%')
self.Tip3.SetLabel('二维码生成系统')
- self.Tip4.SetLabel('')
+ self.Tip4.SetLabel('什么都没有呢!')
self.TIP1.SetLabel('状态:FUNT')
self.TIP2.SetLabel('状态:FUNT')
@@ -2191,8 +2169,7 @@ def G_7(self, event):
def G_8(self, event):
""" 8号功能分区-化学 """
- global Main_State, colour_Hover, colour_SideL
- Main_State = 8
+ self.Main_State = 8
self.Colour_clean()
@@ -2201,9 +2178,9 @@ def G_8(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page8.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note8.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -2212,7 +2189,7 @@ def G_8(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G8.SetBackgroundColour(colour_Main)
self.G8.SetForegroundColour("White")
@@ -2240,8 +2217,7 @@ def G_8(self, event):
def G_9(self, event):
""" 9号功能分区-生物 """
- global Main_State, colour_Hover, colour_SideL
- Main_State = 9
+ self.Main_State = 9
self.Colour_clean()
@@ -2250,9 +2226,9 @@ def G_9(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page9.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note9.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -2261,7 +2237,7 @@ def G_9(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G9.SetBackgroundColour(colour_Main)
self.G9.SetForegroundColour("White")
@@ -2289,8 +2265,7 @@ def G_9(self, event):
def G_10(self, event):
""" 10号功能分区-通用 """
- global Main_State, colour_Hover, colour_SideL
- Main_State = 10
+ self.Main_State = 10
self.Colour_clean()
@@ -2299,9 +2274,9 @@ def G_10(self, event):
colour_cfg = configparser.ConfigParser()
colour_cfg.read('./DATA/Main/Theme/colourful/Page10.cfg')
colour_Main = colour_cfg.get('colour', 'colour_Main')
- colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
- colour_SideL = colour_cfg.get('colour', 'colour_SideL')
- colour_Hover = colour_cfg.get('colour', 'colour_Hover')
+ self.colour_Bottom = colour_cfg.get('colour', 'colour_Bottom')
+ self.colour_SideL = colour_cfg.get('colour', 'colour_SideL')
+ self.colour_Hover = colour_cfg.get('colour', 'colour_Hover')
note = open('./DATA/Main/Note/Note10.txt',
'r', encoding='utf-8') # 主界面留言定义
@@ -2310,7 +2285,7 @@ def G_10(self, event):
note = note[roll]
note = note.replace('\n', '')
- self.Colour_Set(note, colour_Main, colour_Bottom, colour_SideL)
+ self.Colour_Set(note, colour_Main, self.colour_Bottom, self.colour_SideL)
self.G10.SetBackgroundColour(colour_Main)
self.G10.SetForegroundColour("White")
@@ -2774,9 +2749,7 @@ def start(self):
"""
程序初始化界面
"""
- global setup
- if setup == 1:
- setup = 2
+ if self.setup == 1:
buer = True
self.T_F1.Show(buer)
self.T_F2.Show(buer)
@@ -2831,7 +2804,6 @@ def start(self):
self.B_Side_Close.Show(buer)
self.CMD_OUT.Show(buer)
self.CMD_IN.Show(buer)
- self.Push.Show(buer)
self.B_Side_Refresh.Show(buer)
self.B_Side_Run.Show(buer)
@@ -2848,7 +2820,9 @@ def start(self):
self.resize()
self.SetBackgroundColour('White')
- elif setup == 0:
+ self.setup = 2
+
+ elif self.setup == 0:
buer = False
self.T_F1.Show(buer)
self.T_F2.Show(buer)
@@ -2903,7 +2877,6 @@ def start(self):
self.B_Side_Close.Show(buer)
self.CMD_OUT.Show(buer)
self.CMD_IN.Show(buer)
- self.Push.Show(buer)
self.B_Side_Refresh.Show(buer)
self.B_Side_Run.Show(buer)
@@ -2917,14 +2890,13 @@ def start(self):
self.Spacer_M.Show(True)
- setup = 1
+ self.setup = 1
def Home(self):
"""
返回初始界面
"""
- global setup, Main_State, colour_Hover
- colour_Hover = '#A65F00'
+ self.colour_Hover = '#A65F00'
buer = False
self.T_F1.Show(buer)
@@ -2982,7 +2954,6 @@ def Home(self):
self.B_Side_Run.Show(buer)
self.CMD_OUT.Show(buer)
self.CMD_IN.Show(buer)
- self.Push.Show(buer)
self.Side_Tip.Show(buer)
self.Plug_in_box.Show(buer)
@@ -3020,8 +2991,8 @@ def Home(self):
self.Colour_clean()
- Main_State = 0
- setup = 1
+ self.Main_State = 0
+ self.setup = 1
self.Refresh()
@@ -3139,9 +3110,6 @@ def CMD(self, info):
elif info == 'help' or info == '?':
self.CMD_OUT.SetValue(
self.CMD_OUT.GetValue() + '\n' + '>>>Help:内置CMD程序版本:021.09.04\n可使用的命令:\nhelp\nquit\ntime\nrandom\nNet_Check\nSound_Check')
- elif info == 'RBS_PLC_1' or info == 'rbsplc1':
- self.CMD_OUT.SetValue(self.CMD_OUT.GetValue(
- ) + '\n' + '>>>RBS_PLC:' + str(RBS_PLC.get_desktop()))
else:
self.CMD_OUT.SetValue(
self.CMD_OUT.GetValue() + '\n' + '>>>error:' + '未知的指令')
@@ -3232,6 +3200,8 @@ def OnDropFiles(self, x, y, filenames):
with open(name, 'rb') as img_file:
wx.CallAfter(wx.MessageBox, '文件类型:' + file_type +
'[位图]' + '\n' + '程序推测文件类型:' + imghdr.what(img_file), caption='文件处理')
+ elif file_type == 'exe':
+ wx.CallAfter(os.system,name)
else:
wx.CallAfter(wx.MessageBox, '文件类型:' + file_type +
'[不支持]' + '\n' + '强行加载可能会导致未知错误!', caption='文件处理')
@@ -3274,6 +3244,35 @@ def run(self):
else:
wx.CallAfter(self.frame.move_stop, self)
+###########################################################################
+# 右键窗口class
+# Right click window Class
+###########################################################################
+class MyPopupMenu(wx.Menu):
+ def __init__(self,parent):
+ super(MyPopupMenu,self).__init__()
+ self.parent = parent
+
+ self.SetTitle('PopuMenu_Main')
+
+ mmi = wx.MenuItem(self,wx.NewIdRef(),'最小化')
+ self.Append(mmi)
+ self.Bind(wx.EVT_MENU, self.OnMinimize, mmi)
+
+ cmi = wx.MenuItem(self,wx.NewIdRef(),'退出')
+ self.Append(cmi)
+ self.Bind(wx.EVT_MENU, self.OnClose, cmi)
+
+ cmi = wx.MenuItem(self,wx.NewIdRef(),'刷新')
+ self.Append(cmi)
+ self.Bind(wx.EVT_MENU, self.Refresh, cmi)
+
+ def OnMinimize(self,event):
+ self.parent.Ico()
+ def OnClose(self,event):
+ self.parent.Quit()
+ def Refresh(self,event):
+ self.parent.Refresh()
###########################################################################
# 主函数
diff --git a/Plug_in.py b/Plug_in.py
index b2ef32e..77c6970 100644
--- a/Plug_in.py
+++ b/Plug_in.py
@@ -72,10 +72,13 @@ def Setup(self, event):
for i in range(0,len(list_main)):
list_name = str(list_main[i]).replace('\n', '')
+ print(list_name)
if str(list_name) == name:
self.B_Change.SetLabel('卸载')
place = i
- #print(place)
+ break
+ else:
+ self.B_Change.SetLabel('加载')
if self.B_Change.GetLabel() == '---':
self.B_Change.SetLabel('加载')
diff --git a/Preparation.py b/Preparation.py
index 3352921..6950cd9 100644
--- a/Preparation.py
+++ b/Preparation.py
@@ -12,6 +12,10 @@
##############################
# import
##############################
+##import pyi_splash
+##pyi_splash.update_text('UI Loaded ...')
+##pyi_splash.close()
+
import wx
import hashlib
import os.path
diff --git a/T_Test.py b/T_Test.py
index f2aa5b4..0b90bcf 100644
--- a/T_Test.py
+++ b/T_Test.py
@@ -1,96 +1,115 @@
-# -*- encoding:UTF-8 -*-
+##############################
+# import
+##############################
import wx
-import threading
-import random
-
-
-class WorkerThread(threading.Thread):
- def __init__(self, threadNum, window):
- threading.Thread.__init__(self)
- self.threadNum = threadNum
- self.window = window
- self.timeToQuit = threading.Event()
- self.timeToQuit.clear()
- self.messageCount = random.randint(10, 20)
- self.messageDelay = 0.1 + 2.0*random.random()
-
- # 运行一个线程
- def run(self):
- msg = "Thread %d iterating %d times with a delay of %1.4f\n" % (
- self.threadNum, self.messageCount, self.messageDelay)
- wx.CallAfter(self.window.LogMessage, msg)
- for i in range(1, self.messageCount+1):
- self.timeToQuit.wait(self.messageDelay)
- if self.timeToQuit.isSet(): # 判断是否设置了标志位
- break
- msg = "Message %d from thread %d\n" % (i, self.threadNum)
- wx.CallAfter(self.window.LogMessage, msg)
- else:
- wx.CallAfter(self.window.ThreadFinished, self)
- # 暂停所有线程
-
- def stop(self):
- self.timeToQuit.set()
-
-
-class MyFrame(wx.Frame):
- def __init__(self):
- wx.Frame.__init__(self, None, title="Multi-threaded GUI")
- self.threads = []
- self.count = 0
- panel = wx.Panel(self)
- startBtn = wx.Button(panel, -1, "Start a thread")
- stopBtn = wx.Button(panel, -1, "Stop all threads")
- self.tc = wx.StaticText(panel, -1, "Worker Threads: 00")
- self.log = wx.TextCtrl(
- panel, -1, "", style=wx.TE_RICH | wx.TE_MULTILINE)
- inner = wx.BoxSizer(wx.HORIZONTAL)
- inner.Add(startBtn, 0, wx.RIGHT, 15)
- inner.Add(stopBtn, 0, wx.RIGHT, 15)
- inner.Add(self.tc, 0, wx.ALIGN_CENTER_VERTICAL)
- main = wx.BoxSizer(wx.VERTICAL)
- main.Add(inner, 0, wx.ALL, 5)
- main.Add(self.log, 1, wx.EXPAND | wx.ALL, 5)
- panel.SetSizer(main)
- self.Bind(wx.EVT_BUTTON, self.OnStartButton, startBtn)
- self.Bind(wx.EVT_BUTTON, self.OnStopButton, stopBtn)
- self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
-
- self.UpdateCount()
-
- def OnStartButton(self, evt):
- self.count += 1
- thread = WorkerThread(self.count, self) # 创建一个线程
- self.threads.append(thread)
- self.UpdateCount()
- thread.start() # 启动线程
-
- def OnStopButton(self, evt):
- self.StopThreads()
- self.UpdateCount()
-
- def OnCloseWindow(self, evt):
- self.StopThreads()
- self.Destroy()
-
- def StopThreads(self): # 从池中删除线程
- while self.threads:
- thread = self.threads[0]
- thread.stop()
- self.threads.remove(thread)
-
- def UpdateCount(self):
- self.tc.SetLabel("Worker Threads: %d" % len(self.threads))
-
- def LogMessage(self, msg): # 注册一个消息
- self.log.AppendText(msg)
-
- def ThreadFinished(self, thread): # 删除线程
- self.threads.remove(thread)
- self.UpdateCount()
-
-
-app = wx.App()
-frm = MyFrame()
-frm.Show()
-app.MainLoop()
+
+import GUI_Draw
+import sys
+import ctypes
+try:
+ ctypes.windll.shcore.SetProcessDpiAwareness(True)
+except Exception:
+ pass
+
+from gsnodegraph import EVT_GSNODEGRAPH_ADDNODEBTN
+from nodes import OutputNode, MixNode, ImageNode, BlurNode, BlendNode, ValueNode
+from nodegraph import NodeGraph
+
+# Install a custom displayhook to keep Python from setting the global
+# _ (underscore) to the value of the last evaluated expression.
+# If we don't do this, our mapping of _ to gettext can get overwritten.
+# This is useful/needed in interactive debugging with PyShell.
+def _displayHook(obj):
+ """ Custom display hook to prevent Python stealing '_'. """
+
+ if obj is not None:
+ print(repr(obj))
+
+# Add translation macro to builtin similar to what gettext does.
+import builtins
+builtins.__dict__['_'] = wx.GetTranslation
+
+
+class MainApp(wx.App):
+
+ def OnInit(self):
+
+ # Work around for Python stealing "_".
+ sys.displayhook = _displayHook
+
+ return True
+
+##############################
+# GUI的函数桥接
+##############################
+
+
+class CalcFrame(GUI_Draw.Main):
+ def __init__(self, parent):
+ # 定义主函数
+ GUI_Draw.Main.__init__(self, parent)
+ node_registry = {
+ "image_nodeid": ImageNode,
+ "mix_nodeid": MixNode,
+ "blur_nodeid": BlurNode,
+ "blend_nodeid": BlendNode,
+ "value_nodeid": ValueNode,
+ "output_nodeid": OutputNode
+ }
+ # Setup the config with datatypes and node categories
+ config = {
+ "image_datatype": "IMAGE",
+ "node_datatypes": {
+ "IMAGE": "#C6C62D", # Yellow
+ "INTEGER": "#A0A0A0", # Grey
+ "FLOAT": "#A0A0A0", # Grey
+ "VALUE": "#A0A0A0", # Depreciated!
+ },
+ "node_categories": {
+ "INPUT": "#E64555", # Burgendy
+ "DRAW": "#AF4467", # Pink
+ "MASK": "#084D4D", # Blue-green
+ "CONVERT": "#564B7C", # Purple
+ "FILTER": "#558333", # Green
+ "BLEND": "#498DB8", # Light blue
+ "COLOR": "#C2AF3A", # Yellow
+ "TRANSFORM": "#6B8B8B", # Blue-grey
+ "OUTPUT": "#B33641" # Red
+ }
+ }
+
+ # Init the nodegraph
+ print(self)
+ ng = NodeGraph(parent=self, registry=node_registry, config=config,size=(500,500))
+
+ # Add nodes to the node graph
+ node1 = ng.AddNode("image_nodeid", pos=wx.Point(100, 10))
+ node2 = ng.AddNode("image_nodeid", pos=wx.Point(450, 400))
+ node3 = ng.AddNode("mix_nodeid", pos=wx.Point(400, 100))
+ node4 = ng.AddNode("blur_nodeid", pos=wx.Point(700, 100))
+ node5 = ng.AddNode("blend_nodeid", pos=wx.Point(720, 300))
+ node6 = ng.AddNode("value_nodeid", pos=wx.Point(620, 430))
+ node7 = ng.AddNode("output_nodeid", pos=wx.Point(1000, 290))
+
+ def Close(self, event):
+ try:
+ if app.GetAppName() != '_core.cp38-win_amd64':
+ self.Destroy()
+ except:
+ self.Hide()
+
+##############################
+# 主函数
+##############################
+
+
+def main():
+ global app
+ app = MainApp(False)
+ frame = CalcFrame(None)
+ frame.Show(True)
+ app.MainLoop()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/T_package_exe.py b/T_package_exe.py
index 1c74068..51f83ff 100644
--- a/T_package_exe.py
+++ b/T_package_exe.py
@@ -17,7 +17,7 @@ def get_all_file_paths(directory):
def pyinstaller():
# pyinstaller 打包命令
- os.system('pyinstaller -D Preparation.py -i ICOV4.ico --upx-dir UPX -y -n RBS_Software -w')
+ os.system('pyinstaller -D Preparation.py -i ICOV4.ico --upx-dir UPX -y -n RBS_Software -w --hidden-import=pyi_splash')
def zip():
#遍历写入.zip
diff --git a/nodegraph.py b/nodegraph.py
new file mode 100644
index 0000000..3ffa93d
--- /dev/null
+++ b/nodegraph.py
@@ -0,0 +1,27 @@
+# ----------------------------------------------------------------------------
+# gsnodegraph Copyright 2019-2022 by Noah Rahm and contributors
+#
+# 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.
+# ----------------------------------------------------------------------------
+
+import wx
+
+from gsnodegraph import NodeGraphBase
+from gsnodegraph.constants import *
+
+
+class NodeGraph(NodeGraphBase):
+ def __init__(self, parent, registry, config, *args, **kwds):
+ NodeGraphBase.__init__(self, parent, registry, config, *args, **kwds)
+
+ # Do your custom stuff and overrides here
diff --git a/nodes.py b/nodes.py
new file mode 100644
index 0000000..68ff8ee
--- /dev/null
+++ b/nodes.py
@@ -0,0 +1,179 @@
+# ----------------------------------------------------------------------------
+# gsnodegraph Copyright 2019-2022 by Noah Rahm and contributors
+#
+# 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.
+# ----------------------------------------------------------------------------
+
+from gsnodegraph import NodeBase
+
+class Excel_import(NodeBase):
+ def __init__(self, nodegraph, _id):
+ NodeBase.__init__(self, nodegraph, _id)
+
+ self.label = "Excel_import"
+ self.category = "CONVERT"
+ self.outputs = {
+ "Path": Output(idname="Path", datatype="IMAGE", label="path")
+ }
+ self.properties = {}
+
+class Image(object):
+ """ An example datatype. """
+ # Create your datatype. For this example, we do nothing.
+ pass
+
+
+class Property(object):
+ """ Example property base class. """
+ def __init__(self, idname, default, label, exposed=True,
+ can_be_exposed=True, visible=False):
+ self.idname = idname
+ self.label = label
+ self.default = default
+ self.exposed = exposed
+ self.can_be_exposed = can_be_exposed
+ self.visible = visible
+ self.binding = None
+ self.datatype = None
+
+
+class ImageProp(Property):
+ """ Example property. """
+ def __init__(self, idname, default=Image(), label="Image", exposed=True,
+ can_be_exposed=True, visible=True):
+ Property.__init__(self, idname, default, label, exposed,
+ can_be_exposed, visible)
+ self.value = default
+ self.datatype = "IMAGE"
+
+ def GetValue(self):
+ return self.value
+
+ def SetValue(self, value):
+ self.value = value
+
+
+class IntegerProp(Property):
+ """ Example property. """
+ def __init__(self, idname, default=1, label="Integer", exposed=True,
+ can_be_exposed=True, visible=True):
+ Property.__init__(self, idname, default, label, exposed,
+ can_be_exposed, visible)
+ self.value = default
+ self.datatype = "INTEGER"
+
+ def GetValue(self):
+ return self.value
+
+ def SetValue(self, value):
+ self.value = value
+
+
+class Output(object):
+ def __init__(self, idname, datatype, label, visible=True):
+ self.idname = idname
+ self.datatype = datatype
+ self.label = label
+ self.visible = visible
+
+
+class OutputNode(NodeBase):
+ """ Example output node. Only one of these should exist at a time.
+ Use ``self._isoutput = True`` to set as the output node. """
+ def __init__(self, nodegraph, _id):
+ NodeBase.__init__(self, nodegraph, _id)
+
+ self.label = "Output"
+ self.is_output = True
+ self.category = "OUTPUT"
+ self.properties = {
+ "image_socketid": ImageProp("image_socketid", label="Image")
+ }
+
+
+class ImageNode(NodeBase):
+ """ Example node showing an input node. """
+ def __init__(self, nodegraph, _id):
+ NodeBase.__init__(self, nodegraph, _id)
+
+ self.label = "Image"
+ self.category = "INPUT"
+ self.outputs = {
+ "image": Output(idname="image", datatype="IMAGE", label="Image")
+ }
+ self.properties = {}
+
+
+class MixNode(NodeBase):
+ """ Example node showing a node with multiple inputs. """
+ def __init__(self, nodegraph, _id):
+ NodeBase.__init__(self, nodegraph, _id)
+
+ self.label = "Mix"
+ self.category = "BLEND"
+ self.outputs = {
+ "image": Output(idname="image", datatype="IMAGE", label="Image"),
+ "alpha": Output(idname="alpha", datatype="INTEGER", label="Alpha")
+ }
+ self.properties = {
+ "image1_socketid": ImageProp("image1_socketid", label="Overlay"),
+ "image2_socketid": ImageProp("image2_socketid", label="Image")
+ }
+
+
+class BlurNode(NodeBase):
+ """ Example node showing a node with multiple inputs
+ and different datatypes. """
+ def __init__(self, nodegraph, _id):
+ NodeBase.__init__(self, nodegraph, _id)
+
+ self.label = "Blur"
+ self.category = "FILTER"
+ self.outputs = {
+ "image": Output(idname="image", datatype="IMAGE", label="Image")
+ }
+ self.properties = {
+ "image1_socketid": ImageProp("image1_socketid", label="Image"),
+ "int_socketid": IntegerProp("int_socketid", label="Integer")
+ }
+
+
+class BlendNode(NodeBase):
+ """ Example node showing a node with multiple inputs. """
+ def __init__(self, nodegraph, _id):
+ NodeBase.__init__(self, nodegraph, _id)
+
+ self.label = "Brightness/Contrast"
+ self.category = "BLEND"
+
+ self.outputs = {
+ "image": Output(idname="image", datatype="IMAGE", label="Image")
+ }
+ self.properties = {
+ "alphamask_socketid": ImageProp("alphamask_socketid", label="Alpha"),
+ "image1_socketid": ImageProp("image1_socketid", label="Image"),
+ "image2_socketid": ImageProp("image2_socketid", label="Image")
+ }
+
+
+class ValueNode(NodeBase):
+ """ Example node showing a node with a different datatype output. """
+ def __init__(self, nodegraph, _id):
+ NodeBase.__init__(self, nodegraph, _id)
+
+ self.label = "Value"
+ self.category = "INPUT"
+ self.outputs = {
+ "value": Output(idname="value", datatype="INTEGER", label="Value")
+ }
+