Example #1
0
    def _Start_Frame(self):
        """ 사용할 프레임을 여기다 정의 하세요"""
        self.Main_Frame = Frames.Main()
        self.Main_Frame.Start(self.g)
        self.Main_Frame.Enable(True)
        self.Main_Frame.Visible()

        self.Graph_Frame = Frames.Graph()
        self.Graph_Frame.Enable(False)
        self.Graph_Frame.Visible(False)

        self.View_Frame = Frames.View()
        self.View_Frame.Start(self.g)
        self.View_Frame.Enable(False)
        self.View_Frame.Visible(False)

        self.Plus_Frame = Frames.Plus()
        self.Plus_Frame.Start(self.g)
        self.Plus_Frame.Enable(False)
        self.Plus_Frame.Visible(False)

        self.Warning_Frame = Frames.WarningFrame()
        self.Warning_Frame.Start(self.g)
        self.Warning_Frame.Enable(False)
        self.Warning_Frame.Visible(False)
        self.controlbox.Frame()
Example #2
0
 def Frame ( self ):
     """자체적으로 프래임들을 만듭니다. """
     self.그래프 = Frames.ControlFrame_Graph ()
     self.내역 = Frames.ControlFrame_View ()
     self.추가 = Frames.ControlFrame_Plus ()
     self.그래프.Start ( self.secondCanvas )
     self.내역.Start ( self.secondCanvas )
     self.추가.Start ( self.secondCanvas )
     self.그래프.Enable ( )
     self.내역.Enable()
     self.추가.Enable()
     self.그래프.Visible ( )
     self.내역.Visible ()
     self.추가.Visible()
Example #3
0
def AppendPersonToSend(Frame, name):
    AvailablePeople.append(
        Frames.SendToPanel(Frame.m_scrolledWindow1, wx.ID_ANY,
                           wx.DefaultPosition, wx.DefaultSize,
                           wx.TAB_TRAVERSAL))
    Frame.bSizer5.Add(AvailablePeople[-1], 1,
                      wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)
    AvailablePeople[-1].ReceiverName.SetLabel(name)
    AvailablePeople[-1].SendButton.Bind(wx.EVT_BUTTON, SendClicked)
 def loadSinks(self):
     self.sink_list.addSink(Info.init())
     self.sink_list.addSink(Buttons.init())
     self.sink_list.addSink(Menus.init())
     self.sink_list.addSink(Images.init())
     self.sink_list.addSink(Layouts.init())
     self.sink_list.addSink(Lists.init())
     self.sink_list.addSink(Popups.init())
     self.sink_list.addSink(Tables.init())
     self.sink_list.addSink(Text.init())
     self.sink_list.addSink(Trees.init())
     self.sink_list.addSink(Frames.init())
     self.sink_list.addSink(Tabs.init())
Example #5
0
 def loadSinks(self):
     self.sink_list.add(Info.init())
     self.sink_list.add(Buttons.init())
     self.sink_list.add(Menus.init())
     self.sink_list.add(Images.init())
     self.sink_list.add(Layouts.init())
     self.sink_list.add(Lists.init())
     self.sink_list.add(Popups.init())
     self.sink_list.add(Tables.init())
     self.sink_list.add(Text.init())
     self.sink_list.add(Trees.init())
     self.sink_list.add(Frames.init())
     self.sink_list.add(Tabs.init())
    def OnShow(self, event):
        #this handles the dynamic adding of players
        global NumberOfPlayers
        global playerList, TotalPlayers
        for i in range(NumberOfPlayers):
            playerList.append(Frames.PlayerPanel( self.m_scrolledWindow2, wx.ID_ANY, wx.DefaultPosition, wx.Size( -1,90 ), wx.BORDER_NONE|wx.TAB_TRAVERSAL ))
            self.bSizer8.Add( playerList[-1], 0, wx.TOP|wx.BOTTOM|wx.LEFT|wx.EXPAND, 5 )
            #set the player names to what number they are
            playerList[-1].PlayerNameTextBox.Value = "Player {}".format(i+1)
        TotalPlayers = len(playerList)
        #print(TotalPlayers)

        #highlight player 1 as they are the first player to bowl
        SelectPlayer(0).PlayerNameTextBox.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_HIGHLIGHT ) )
Example #7
0
 def loadSinks(self):
     #self.sink_list.addSink(DataTree.init())
     #self.sink_list.addSink(RecipeSystemIFACE.init())
     self.sink_list.addSink(ADViewerIFACE.init())
     self.sink_list.addSink(RecipeViewer.init())
     self.sink_list.addSink(FITSStoreFACE.init())
     self.sink_list.addSink(DisplayIFACE.init())
     self.sink_list.addSink(Info.init())
     if False:
         self.sink_list.addSink(Buttons.init())
         self.sink_list.addSink(Menus.init())
         self.sink_list.addSink(Images.init())
         self.sink_list.addSink(Layouts.init())
         self.sink_list.addSink(Lists.init())
         self.sink_list.addSink(Popups.init())
         self.sink_list.addSink(Tables.init())
         self.sink_list.addSink(Text.init())
     if False: #preserving originaly order
         self.sink_list.addSink(Frames.init())
         self.sink_list.addSink(Tabs.init())
Example #8
0
 def CloseFrameAndOpenSalePage(self):  
     self.Destroy()
     Frames.cashFrame()  
Example #9
0
 def ClosegetMoneyFrame(self,event):#零售收款页面关闭,打开收银页面
    self.Destroy()
    Frames.cashFrame()
Example #10
0
            circle_parameters = conf['circle_parameters']
            shape = Shapes.Circle(obj_color, circle_parameters['radius'])
            data_dir = data_dir + '_' + str(circle_parameters['radius'])

        data_dir = data_dir + "_" + str(h) + "_" + str(w)
        check_dirs(data_dir, True)
        print(data_dir)

        for i in range(n_samples):
            if i % 1 == 0 or i == n_samples - 1:
                print(i)

            if motion_type == 'URM':
                if i == 0:
                    header = 'x0 u_x y0 n_points gap motion noise(mean, standard deviation)\n'
                sample = Frames.URM(noise_parameters, n_points, gap, h, w,
                                    shape, dof)
            elif motion_type == 'linear':
                if i == 0:
                    header = 'x0 u_x y0 m n_points gap motion noise(mean, standard deviation)\n'
                sample = Frames.Linear(noise_parameters, n_points, gap, h, w,
                                       shape, dof)

            elif motion_type == 'parabolic':
                if i == 0:
                    header = 'x0 u_x y0 a b n_points gap motion noise(mean, standard deviation)\n'
                sample = Frames.Parabolic(noise_parameters, n_points, gap, h,
                                          w, shape, dof)

            else:  # motion_type == 'sinusoidal'
                if i == 0:
                    header = 'x0 u_x y0 a b c f n_points gap motion noise(mean, standard deviation)\n'
Example #11
0
def main():

    # Get Mission Configuration
    mission_file = "Mission1.ini"
    mission_config = configparser.ConfigParser()
    mission_config.sections()
    mission_config.read(mission_file)

    mission_phase = argv[1]

    # Get Connection
    connection = krpc.connect()

    # Revert to Start
    # connection.space_center.launch_vessel_from_vab('New Glenn v2')
    # time.sleep(3)

    # Define vehicle
    vehicle = connection.space_center.active_vessel

    # Establish frames
    vehicle_relative_frame = vehicle.reference_frame
    launch_relative_frame = vehicle.orbit.body.reference_frame

    frames = Frames(connection)

    frames.add_frame(vehicle_relative_frame, 'vehicle', (0, 0, 0),
                     (0.7071068, 0, 0, 0.7071068), (0, 0, 0), (0, 0, 0))

    frames.add_frame(
        launch_relative_frame,
        'launch',
        (159783.82381776502, -1018.4263901739021,
         -578426.6428425296),  # These are hardcoded to the launchpad values
        (0.00169008, 0.99115833, 0.02235677, 0.13077702),
        (0, 0, 0),
        (0, 0, 0))

    # ## This is used for landing barge coordinates ##
    l_pos = vehicle.position(launch_relative_frame)
    l_rot = vehicle.rotation(launch_relative_frame)
    l_rot = [l_rot[3], l_rot[0], l_rot[1], l_rot[2]]
    l_rot = Quaternion(l_rot) * Quaternion([0.5, -0.5, 0.5, 0.5])
    # ################################################

    # frames.add_frame(launch_relative_frame,
    #                  'landing',
    #                  (272167.4350489719, 4319.0206644535065, -534704.2939413232),
    #                  (-0.00346168, 0.97241164, 0.00098668, 0.23324373),
    #                  (0, 0, 0),
    #                  (0, 0, 0))

    frames.add_frame(
        launch_relative_frame, 'landing',
        (159783.82381776502, -1018.4263901739021, -578426.6428425296),
        (0.00169008, 0.99115833, 0.02235677, 0.13077702), (0, 0, 0), (0, 0, 0))

    # x = connection.drawing.add_line((0, 0, 0), (100000, 0, 0), frames.frames['landing'].relative)
    # x.color = (255, 0, 0)
    # x.thickness = 10
    # y = connection.drawing.add_line((0, 0, 0), (0, 100000, 0), frames.frames['landing'].relative)
    # y.color = (0, 255, 0)
    # y.thickness = 10
    # z = connection.drawing.add_line((0, 0, 0), (0, 0, 1000000), frames.frames['landing'].relative)
    # z.color = (0, 0, 255)
    # z.thickness = 10
    #
    # land = connection.drawing.add_line((0, 0, 0), (0, 0, 100000), frames.frames['landing'].relative)
    # land.thickness = 10

    if mission_phase == 'ascent':
        vehicle_controller = AscentController(mission_config, connection,
                                              vehicle, frames.frames)
        vehicle_controller.mission()

    if mission_phase == 'circularization':
        vehicle_controller = CircularizationController(mission_config,
                                                       connection, vehicle,
                                                       frames.frames)
        vehicle_controller.mission()

    if mission_phase == 'landing':
        vehicle_controller = LandingController(mission_config, connection,
                                               vehicle, frames.frames)
        vehicle_controller.mission()
    clock_frame.place(in_=mainframe, anchor="c", relx=.5, rely=.5)

    # Add the frame elements, including the clock like any other element
    #        top blank line
    #        time
    #        bottom blank line
    top_blank_label = tkinter.Label(clock_frame, text=" ").pack()
    clock1 = clock.Clock(clock_frame)
    clock1.pack()
    clock1.configure(bg='#292b5d', fg='silver', font=("alfie", 200))
    bottom_blank_label = tkinter.Label(clock_frame, text=" ").pack()

    #       tkinter.Label(clock_frame, text="Have a nice day.",fg='white',bg='#292b5d').pack()

    ##       outside temperature
    outside_temperature = frames.Outside_Temperature(window)
    outside_temperature.place(in_=mainframe, anchor="c", relx=1 / 6.0, rely=.2)

    ##        outside_pressure
    outside_pressure = frames.Outside_Pressure(window)
    outside_pressure.place(in_=mainframe, anchor="c", relx=3 / 6.0, rely=.2)

    ##        outside humidity
    outside_humidity = frames.Outside_Humidity(window)
    outside_humidity.place(in_=mainframe, anchor="c", relx=5 / 6.0, rely=.2)

    ##        Create Room Values
    ##        room temperature
    room_temperature = frames.Room_Temperature(window)
    room_temperature.place(in_=mainframe, anchor="c", relx=1 / 6.0, rely=.8)