#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.9.5 on Sun Apr  5 16:25:44 2020
#

import wx

# begin wxGlade: dependencies
# end wxGlade

# begin wxGlade: extracode
from matplotlib.backends.backend_wx import NavigationToolbar2Wx as NavigationToolbar
import matplotlib
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from resource import *
import os
# end wxGlade


class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: MyFrame.__init__
        kwds["style"] = kwds.get("style", 0) | wx.DEFAULT_FRAME_STYLE
        wx.Frame.__init__(self, *args, **kwds)
        self.SetSize((1766, 900))
        self.GUI_statusbar = self.CreateStatusBar(3)
        self.GUI_btn_cloudload = wx.Button(self, wx.ID_ANY, u"雲端讀取")
        self.GUI_btn_inputdata = wx.Button(self, wx.ID_ANY, u"輸入資料")
        self.GUI_btn_test = wx.Button(self, wx.ID_ANY, u"測試")
        self.notebook_main = wx.Notebook(self, wx.ID_ANY)
        self.notebook_main_pane_1 = wx.Panel(self.notebook_main, wx.ID_ANY)
        self.window_2 = wx.SplitterWindow(self.notebook_main_pane_1, wx.ID_ANY)
        self.panel_6 = wx.Panel(self.window_2, wx.ID_ANY)
        self.matplotlib_figure_2 = Figure()
        self.GUI_matplotlib_canvas_2 = FigureCanvas(self.panel_6, wx.ID_ANY, self.matplotlib_figure_2)
        self.GUI_matplotlib_toolbar_2 = NavigationToolbar(self.GUI_matplotlib_canvas_2)
        self.GUI_matplotlib_toolbar_2.Realize()
        self.GUI_matplotlib_toolbar_2.update()
        self.panel_5 = wx.Panel(self.panel_6, wx.ID_ANY)
        self.GUI_quick_product_sel = wx.ComboBox(self.panel_5, wx.ID_ANY, choices=["NQ", "XINA50", "2454"], style=wx.CB_DROPDOWN | wx.CB_READONLY)
        self.GUI_quick_multiplier = wx.ComboBox(self.panel_5, wx.ID_ANY, choices=["1", "20", "2000"], style=wx.CB_DROPDOWN)
        self.GUI_quick_max_netvalue = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "26.0", min=0.0, max=9999999999.9)
        self.GUI_quick_current_netvalue = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "25.0", min=0.0, max=9999999999.9)
        self.GUI_quick_stoploss_rate = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "0.1", min=0.0, max=1.0)
        self.GUI_quick_current_price = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "12600.0", min=0.0, max=9999999999.9)
        self.GUI_Q_T1_current_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T1_avg_buy_price = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "0.0", min=0.0, max=9999999999.9)
        self.GUI_Q_T1_avg_buy_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T1_avg_buy_count = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "1", min=1, max=100)
        self.GUI_Q_T2_current_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T2_avg_buy_price = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "0.0", min=0.0, max=9999999999.9)
        self.GUI_Q_T2_avg_buy_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T2_avg_buy_count = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "1", min=1, max=100)
        self.GUI_Q_T3_current_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T3_avg_buy_price = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "0.0", min=0.0, max=9999999999.9)
        self.GUI_Q_T3_avg_buy_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T3_avg_buy_count = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "1", min=1, max=100)
        self.GUI_Q_T4_current_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T4_avg_buy_price = wx.SpinCtrlDouble(self.panel_5, wx.ID_ANY, "0.0", min=0.0, max=9999999999.9)
        self.GUI_Q_T4_avg_buy_pos = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "0", min=-100, max=100)
        self.GUI_Q_T4_avg_buy_count = wx.SpinCtrl(self.panel_5, wx.ID_ANY, "1", min=1, max=100)
        self.GUI_Q_button_apply = wx.Button(self.panel_5, wx.ID_APPLY, "")
        self.notebook_2 = wx.Notebook(self.window_2, wx.ID_ANY, style=wx.NB_BOTTOM)
        self.ui_page_message_copy = wx.ScrolledWindow(self.notebook_2, wx.ID_ANY, style=wx.TAB_TRAVERSAL)
        self.GUI_message_copy = wx.TextCtrl(self.ui_page_message_copy, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
        self.ui_page_log_copy = wx.Panel(self.notebook_2, wx.ID_ANY)
        self.notebook_main_pane_main = wx.Panel(self.notebook_main, wx.ID_ANY)
        self.window_1 = wx.SplitterWindow(self.notebook_main_pane_main, wx.ID_ANY)
        self.panel_2 = wx.Panel(self.window_1, wx.ID_ANY)
        self.matplotlib_figure = Figure()
        self.GUI_matplotlib_canvas = FigureCanvas(self.panel_2, wx.ID_ANY, self.matplotlib_figure)
        self.GUI_matplotlib_toolbar = NavigationToolbar(self.GUI_matplotlib_canvas)
        self.GUI_matplotlib_toolbar.Realize()
        self.GUI_matplotlib_toolbar.update()
        self.panel_1 = wx.Panel(self.panel_2, wx.ID_ANY)
        self.ui_initial_position = wx.SpinCtrl(self.panel_1, wx.ID_ANY, "0", min=0, max=100)
        self.ui_extra_position = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN)
        self.ui_extra_time = wx.ComboBox(self.panel_1, wx.ID_ANY, choices=[], style=wx.CB_DROPDOWN)
        self.notebook_1 = wx.Notebook(self.window_1, wx.ID_ANY, style=wx.NB_BOTTOM)
        self.ui_page_message = wx.ScrolledWindow(self.notebook_1, wx.ID_ANY, style=wx.TAB_TRAVERSAL)
        self.GUI_message = wx.TextCtrl(self.ui_page_message, wx.ID_ANY, "", style=wx.TE_MULTILINE | wx.TE_READONLY)
        self.ui_page_log = wx.Panel(self.notebook_1, wx.ID_ANY)
        self.notebook_main_pane_LOG = wx.Panel(self.notebook_main, wx.ID_ANY)
        self.GUI_log = wx.TextCtrl(self.notebook_main_pane_LOG, wx.ID_ANY, "", style=wx.TE_AUTO_URL | wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH | wx.TE_RICH2)

        self.__set_properties()
        self.__do_layout()

        self.Bind(wx.EVT_BUTTON, self.OnCloudLoad, self.GUI_btn_cloudload)
        self.Bind(wx.EVT_BUTTON, self.OnInputData, self.GUI_btn_inputdata)
        self.Bind(wx.EVT_BUTTON, self.OnTest, self.GUI_btn_test)
        self.Bind(wx.EVT_COMBOBOX, self.OnQuickSimProductSelect, self.GUI_quick_product_sel)
        self.Bind(wx.EVT_BUTTON, self.OnQuickSimApply, self.GUI_Q_button_apply)
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: MyFrame.__set_properties
        self.SetTitle("InvestSim (Pre-Alpha)")
        _icon = wx.NullIcon
        _icon.CopyFromBitmap(wx.Bitmap(os.path.join(RES_DIR,"icon-nobita-50x50.jpg"), wx.BITMAP_TYPE_ANY))
        self.SetIcon(_icon)
        self.GUI_statusbar.SetStatusWidths([-1, -1, -5])

        # statusbar fields
        GUI_statusbar_fields = ["Ready", "Clouds Lee Yun-Ting", ""]
        for i in range(len(GUI_statusbar_fields)):
            self.GUI_statusbar.SetStatusText(GUI_statusbar_fields[i], i)
        self.GUI_btn_cloudload.SetBitmap(wx.Bitmap(os.path.join(RES_DIR,"cloudload-30x30.png"), wx.BITMAP_TYPE_ANY))
        self.GUI_btn_inputdata.SetBitmap(wx.Bitmap(os.path.join(RES_DIR,"gspread-30x30.png"), wx.BITMAP_TYPE_ANY))
        self.GUI_btn_test.SetBitmap(wx.Bitmap(os.path.join(RES_DIR,"test-30x30.jpg"), wx.BITMAP_TYPE_ANY))
        self.GUI_quick_product_sel.SetSelection(1)
        self.GUI_quick_multiplier.SetSelection(0)
        self.GUI_quick_stoploss_rate.SetIncrement(0.1)
        self.GUI_Q_T1_current_pos.SetMinSize((50, 25))
        self.GUI_Q_T1_avg_buy_pos.SetMinSize((50, 25))
        self.GUI_Q_T1_avg_buy_count.SetMinSize((50, 25))
        self.GUI_Q_T2_current_pos.SetMinSize((50, 25))
        self.GUI_Q_T2_avg_buy_pos.SetMinSize((50, 25))
        self.GUI_Q_T2_avg_buy_count.SetMinSize((50, 25))
        self.GUI_Q_T3_current_pos.SetMinSize((50, 25))
        self.GUI_Q_T3_avg_buy_pos.SetMinSize((50, 25))
        self.GUI_Q_T3_avg_buy_count.SetMinSize((50, 25))
        self.GUI_Q_T4_current_pos.SetMinSize((50, 25))
        self.GUI_Q_T4_avg_buy_pos.SetMinSize((50, 25))
        self.GUI_Q_T4_avg_buy_count.SetMinSize((50, 25))
        self.ui_page_message_copy.SetScrollRate(10, 10)
        self.window_2.SetMinimumPaneSize(100)
        self.window_2.SetSashGravity(0.5)
        self.ui_page_message.SetScrollRate(10, 10)
        self.window_1.SetMinimumPaneSize(100)
        self.window_1.SetSashGravity(0.5)
        self.GUI_log.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_INFOBK))
        self.notebook_main.SetFont(wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_LIGHT, 0, ""))
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: MyFrame.__do_layout
        sizer_1 = wx.BoxSizer(wx.VERTICAL)
        sizer_6 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_5 = wx.BoxSizer(wx.VERTICAL)
        sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
        Sizer_Input = wx.StaticBoxSizer(wx.StaticBox(self.panel_1, wx.ID_ANY, u"輸入"), wx.HORIZONTAL)
        grid_sizer_1 = wx.GridSizer(3, 2, 0, 0)
        Sizer_Chart = wx.StaticBoxSizer(wx.StaticBox(self.panel_2, wx.ID_ANY, u"線圖"), wx.VERTICAL)
        sizer_7 = wx.BoxSizer(wx.VERTICAL)
        sizer_9 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_8 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_12 = wx.BoxSizer(wx.VERTICAL)
        Sizer_trial_copy_2 = wx.StaticBoxSizer(wx.StaticBox(self.panel_5, wx.ID_ANY, u"試算4"), wx.HORIZONTAL)
        Sizer_trial_copy_1 = wx.StaticBoxSizer(wx.StaticBox(self.panel_5, wx.ID_ANY, u"試算3"), wx.HORIZONTAL)
        Sizer_trial_copy = wx.StaticBoxSizer(wx.StaticBox(self.panel_5, wx.ID_ANY, u"試算2"), wx.HORIZONTAL)
        Sizer_trial = wx.StaticBoxSizer(wx.StaticBox(self.panel_5, wx.ID_ANY, u"試算1"), wx.HORIZONTAL)
        Sizer_Input_common = wx.StaticBoxSizer(wx.StaticBox(self.panel_5, wx.ID_ANY, u"共用資訊"), wx.VERTICAL)
        grid_sizer_2 = wx.GridSizer(5, 2, 0, 0)
        sizer_11 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_10 = wx.BoxSizer(wx.HORIZONTAL)
        Sizer_Chart_copy = wx.StaticBoxSizer(wx.StaticBox(self.panel_6, wx.ID_ANY, u"線圖"), wx.VERTICAL)
        sizer_4 = wx.StaticBoxSizer(wx.StaticBox(self, wx.ID_ANY, u"功能"), wx.HORIZONTAL)
        sizer_4.Add(self.GUI_btn_cloudload, 0, wx.ALL, 2)
        sizer_4.Add(self.GUI_btn_inputdata, 0, wx.ALL, 2)
        sizer_4.Add((0, 0), 0, 0, 0)
        sizer_4.Add((0, 0), 0, 0, 0)
        sizer_4.Add((0, 0), 0, 0, 0)
        sizer_4.Add((0, 0), 0, 0, 0)
        sizer_4.Add((0, 0), 0, 0, 0)
        sizer_4.Add((0, 0), 0, 0, 0)
        sizer_4.Add((0, 0), 0, 0, 0)
        sizer_4.Add(self.GUI_btn_test, 0, wx.ALL, 2)
        sizer_1.Add(sizer_4, 0, wx.ALL | wx.EXPAND, 2)
        Sizer_Chart_copy.Add(self.GUI_matplotlib_canvas_2, 1, wx.ALL | wx.EXPAND, 2)
        Sizer_Chart_copy.Add(self.GUI_matplotlib_toolbar_2, 0, wx.EXPAND, 0)
        sizer_8.Add(Sizer_Chart_copy, 1, wx.ALL | wx.EXPAND, 0)
        label_4 = wx.StaticText(self.panel_5, wx.ID_ANY, u"產品")
        sizer_10.Add(label_4, 0, wx.ALL, 2)
        sizer_10.Add(self.GUI_quick_product_sel, 0, wx.ALL, 2)
        grid_sizer_2.Add(sizer_10, 1, wx.EXPAND, 0)
        label_5 = wx.StaticText(self.panel_5, wx.ID_ANY, u"乘數")
        sizer_11.Add(label_5, 0, wx.ALL, 2)
        sizer_11.Add(self.GUI_quick_multiplier, 0, wx.ALL | wx.EXPAND, 2)
        grid_sizer_2.Add(sizer_11, 1, wx.EXPAND, 0)
        label_6 = wx.StaticText(self.panel_5, wx.ID_ANY, u"最大淨值(K)")
        grid_sizer_2.Add(label_6, 0, wx.ALL, 2)
        grid_sizer_2.Add(self.GUI_quick_max_netvalue, 0, wx.ALL, 2)
        label_7 = wx.StaticText(self.panel_5, wx.ID_ANY, u"目前淨值(K)")
        grid_sizer_2.Add(label_7, 0, wx.ALL, 2)
        grid_sizer_2.Add(self.GUI_quick_current_netvalue, 0, wx.ALL, 2)
        label_8 = wx.StaticText(self.panel_5, wx.ID_ANY, u"可損失比率")
        grid_sizer_2.Add(label_8, 0, wx.ALL, 2)
        grid_sizer_2.Add(self.GUI_quick_stoploss_rate, 0, wx.ALL, 2)
        label_9 = wx.StaticText(self.panel_5, wx.ID_ANY, u"目前價格")
        grid_sizer_2.Add(label_9, 0, wx.ALL, 2)
        grid_sizer_2.Add(self.GUI_quick_current_price, 0, wx.ALL, 2)
        Sizer_Input_common.Add(grid_sizer_2, 0, 0, 0)
        sizer_12.Add(Sizer_Input_common, 0, wx.ALL, 1)
        label_10 = wx.StaticText(self.panel_5, wx.ID_ANY, u"目前\n口數")
        Sizer_trial.Add(label_10, 0, wx.ALL, 1)
        Sizer_trial.Add(self.GUI_Q_T1_current_pos, 0, wx.ALL, 1)
        label_11 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n價格")
        Sizer_trial.Add(label_11, 0, wx.ALL, 1)
        Sizer_trial.Add(self.GUI_Q_T1_avg_buy_price, 0, wx.ALL, 2)
        label_12 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n口數")
        Sizer_trial.Add(label_12, 0, wx.ALL, 1)
        Sizer_trial.Add(self.GUI_Q_T1_avg_buy_pos, 0, wx.ALL, 1)
        label_13 = wx.StaticText(self.panel_5, wx.ID_ANY, u"分批\n次數")
        Sizer_trial.Add(label_13, 0, wx.ALL, 1)
        Sizer_trial.Add(self.GUI_Q_T1_avg_buy_count, 0, 0, 0)
        sizer_12.Add(Sizer_trial, 0, 0, 0)
        label_14 = wx.StaticText(self.panel_5, wx.ID_ANY, u"目前\n口數")
        Sizer_trial_copy.Add(label_14, 0, wx.ALL, 1)
        Sizer_trial_copy.Add(self.GUI_Q_T2_current_pos, 0, wx.ALL, 1)
        label_15 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n價格")
        Sizer_trial_copy.Add(label_15, 0, wx.ALL, 1)
        Sizer_trial_copy.Add(self.GUI_Q_T2_avg_buy_price, 0, wx.ALL, 2)
        label_16 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n口數")
        Sizer_trial_copy.Add(label_16, 0, wx.ALL, 1)
        Sizer_trial_copy.Add(self.GUI_Q_T2_avg_buy_pos, 0, wx.ALL, 1)
        label_17 = wx.StaticText(self.panel_5, wx.ID_ANY, u"分批\n次數")
        Sizer_trial_copy.Add(label_17, 0, wx.ALL, 1)
        Sizer_trial_copy.Add(self.GUI_Q_T2_avg_buy_count, 0, 0, 0)
        sizer_12.Add(Sizer_trial_copy, 0, 0, 0)
        label_18 = wx.StaticText(self.panel_5, wx.ID_ANY, u"目前\n口數")
        Sizer_trial_copy_1.Add(label_18, 0, wx.ALL, 1)
        Sizer_trial_copy_1.Add(self.GUI_Q_T3_current_pos, 0, wx.ALL, 1)
        label_19 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n價格")
        Sizer_trial_copy_1.Add(label_19, 0, wx.ALL, 1)
        Sizer_trial_copy_1.Add(self.GUI_Q_T3_avg_buy_price, 0, wx.ALL, 2)
        label_20 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n口數")
        Sizer_trial_copy_1.Add(label_20, 0, wx.ALL, 1)
        Sizer_trial_copy_1.Add(self.GUI_Q_T3_avg_buy_pos, 0, wx.ALL, 1)
        label_21 = wx.StaticText(self.panel_5, wx.ID_ANY, u"分批\n次數")
        Sizer_trial_copy_1.Add(label_21, 0, wx.ALL, 1)
        Sizer_trial_copy_1.Add(self.GUI_Q_T3_avg_buy_count, 0, 0, 0)
        sizer_12.Add(Sizer_trial_copy_1, 0, 0, 0)
        label_22 = wx.StaticText(self.panel_5, wx.ID_ANY, u"目前\n口數")
        Sizer_trial_copy_2.Add(label_22, 0, wx.ALL, 1)
        Sizer_trial_copy_2.Add(self.GUI_Q_T4_current_pos, 0, wx.ALL, 1)
        label_23 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n價格")
        Sizer_trial_copy_2.Add(label_23, 0, wx.ALL, 1)
        Sizer_trial_copy_2.Add(self.GUI_Q_T4_avg_buy_price, 0, wx.ALL, 2)
        label_24 = wx.StaticText(self.panel_5, wx.ID_ANY, u"加碼\n口數")
        Sizer_trial_copy_2.Add(label_24, 0, wx.ALL, 1)
        Sizer_trial_copy_2.Add(self.GUI_Q_T4_avg_buy_pos, 0, wx.ALL, 1)
        label_25 = wx.StaticText(self.panel_5, wx.ID_ANY, u"分批\n次數")
        Sizer_trial_copy_2.Add(label_25, 0, wx.ALL, 1)
        Sizer_trial_copy_2.Add(self.GUI_Q_T4_avg_buy_count, 0, 0, 0)
        sizer_12.Add(Sizer_trial_copy_2, 0, 0, 0)
        sizer_12.Add(self.GUI_Q_button_apply, 0, wx.ALIGN_CENTER, 0)
        self.panel_5.SetSizer(sizer_12)
        sizer_8.Add(self.panel_5, 0, 0, 0)
        self.panel_6.SetSizer(sizer_8)
        sizer_9.Add(self.GUI_message_copy, 1, wx.ALL | wx.EXPAND, 2)
        self.ui_page_message_copy.SetSizer(sizer_9)
        self.notebook_2.AddPage(self.ui_page_message_copy, u"訊息")
        self.notebook_2.AddPage(self.ui_page_log_copy, "log")
        self.window_2.SplitHorizontally(self.panel_6, self.notebook_2, 605)
        sizer_7.Add(self.window_2, 1, wx.EXPAND, 0)
        self.notebook_main_pane_1.SetSizer(sizer_7)
        Sizer_Chart.Add(self.GUI_matplotlib_canvas, 1, wx.ALL | wx.EXPAND, 2)
        Sizer_Chart.Add(self.GUI_matplotlib_toolbar, 0, wx.EXPAND, 0)
        sizer_2.Add(Sizer_Chart, 1, wx.ALL | wx.EXPAND, 0)
        label_1 = wx.StaticText(self.panel_1, wx.ID_ANY, u"初始口數")
        grid_sizer_1.Add(label_1, 0, wx.ALL, 2)
        grid_sizer_1.Add(self.ui_initial_position, 0, wx.ALL, 2)
        label_2 = wx.StaticText(self.panel_1, wx.ID_ANY, u"加碼口數")
        grid_sizer_1.Add(label_2, 0, wx.ALL, 2)
        grid_sizer_1.Add(self.ui_extra_position, 0, wx.ALL, 2)
        label_3 = wx.StaticText(self.panel_1, wx.ID_ANY, u"加碼次數")
        grid_sizer_1.Add(label_3, 0, wx.ALL, 2)
        grid_sizer_1.Add(self.ui_extra_time, 0, wx.ALL, 2)
        Sizer_Input.Add(grid_sizer_1, 1, 0, 0)
        self.panel_1.SetSizer(Sizer_Input)
        sizer_2.Add(self.panel_1, 0, 0, 0)
        self.panel_2.SetSizer(sizer_2)
        sizer_3.Add(self.GUI_message, 1, wx.ALL | wx.EXPAND, 2)
        self.ui_page_message.SetSizer(sizer_3)
        self.notebook_1.AddPage(self.ui_page_message, u"訊息")
        self.notebook_1.AddPage(self.ui_page_log, "log")
        self.window_1.SplitHorizontally(self.panel_2, self.notebook_1, 450)
        sizer_5.Add(self.window_1, 1, wx.EXPAND, 0)
        self.notebook_main_pane_main.SetSizer(sizer_5)
        sizer_6.Add(self.GUI_log, 1, wx.ALL | wx.EXPAND, 2)
        self.notebook_main_pane_LOG.SetSizer(sizer_6)
        self.notebook_main.AddPage(self.notebook_main_pane_1, u"快速試算")
        self.notebook_main.AddPage(self.notebook_main_pane_main, u"趨勢")
        self.notebook_main.AddPage(self.notebook_main_pane_LOG, "LOG")
        sizer_1.Add(self.notebook_main, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        self.Centre()
        # end wxGlade

    def OnCloudLoad(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'OnCloudLoad' not implemented!")
        event.Skip()

    def OnInputData(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'OnInputData' not implemented!")
        event.Skip()

    def OnTest(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'OnTest' not implemented!")
        event.Skip()

    def OnQuickSimProductSelect(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'OnQuickSimProductSelect' not implemented!")
        event.Skip()

    def OnQuickSimApply(self, event):  # wxGlade: MyFrame.<event_handler>
        print("Event handler 'OnQuickSimApply' not implemented!")
        event.Skip()

# end of class MyFrame

class MyApp(wx.App):
    def OnInit(self):
        self.frame = MyFrame(None, wx.ID_ANY, "")
        self.SetTopWindow(self.frame)
        self.frame.Show()
        return True

# end of class MyApp

if __name__ == "__main__":
    app = MyApp(0)
    app.MainLoop()
