コード例 #1
0
ファイル: Frames.py プロジェクト: arkorsky/Client
 def __init__(self,cashMoney,GoodsData,saleOrderId,saleOrder,saleOrderDetail): #退货金额 退货商品信息,销售单号,销售单,销售单详细信息
   print(saleOrderId)
   wx.Frame.__init__(self, None, -1, u"退款明细",size=(800,600),style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
   self.Bind(wx.EVT_CLOSE,self.ClosereturnMoneyFrame)
   self.Centre()
   Panels.returnMoneyPage(self,cashMoney,GoodsData,saleOrderId,saleOrder,saleOrderDetail)
   self.Show()
コード例 #2
0
	def OnUpload(self, event):	
		if hasattr(self, 'project'):
			name = self.project.get('name')
			slug = self.project.get('slug')
			log = self.ReadChangelog()
			
			version = None
			release = 'r'
			
			if log:
				match = re.search('(\d+\.?\d*\.?\d*)', log)
				if match:
					version = match.group(1)
					if re.search(version + '\s+\(beta\)', log):
						release = 'b'

			if self.UploadRequirement('Slug', slug) and self.UploadRequirement('Version', version):
				self.zipFile = zipper.ZipFile(ZIP_PATH, 'w')
				self.IterateFiles(self.project, self.CompressFile, version)
				self.zipFile.close()
				
				zipName = name + (version and (' ' + version) or '') + '.zip'
				error = self.UploadFile(slug, version, release, log, zipName)
				os.remove(TEMP_FILE)
				os.remove(ZIP_PATH)
				
				if error:
					Panels.Error(self, 'Error Uploading', error)
				else:
					Panels.Alert(self, 'Upload Successful', 'Version ' + version + ' of ' + name + ' has been successfully uploaded.')
コード例 #3
0
ファイル: Main.py プロジェクト: Mustang01/Elevator
    def __init__(self):
        # hardcode for now
        floors = 5
        # event for when the car moves to a different floor
        # one car for now, more to be added and this will change to a list
        self.car_1_floor_change = Event()

        #button descriptors, will be made to make all the elevator panel
        #buttons in the car.
        button_descriptor_list = []
        for x in range(floors):
            button_name = "button" + str(x)
            button_descriptor_list.append(
                Buttons.ButtonDescriptor(button_name, x))

        #make CallPanels for each floor
        self.call_panels = []
        for x in range(floors):
            call_panel_type = Panels.CallPanelType.ANYMIDDLEFLOOR
            #get the call panel type right, per the floor
            if (x == 0):
                call_panel_type = Panels.CallPanelType.BOTTOMFLOOR
            elif (x == floors - 1):
                call_panel_type = Panels.CallPanelType.TOPFLOOR
            call_panel = Panels.CallPanel(self.car_1_floor_change, x,
                                          call_panel_type)
            call_panel.call += self.elevator_call_received
            self.call_panels.append(call_panel)

        #make a new elevator panel, for the car
        self.elevator_panel = Panels.ElevatorPanel(button_descriptor_list,
                                                   self.car_1_floor_change)
        #make the elevator car
        self.elevator_car = ElevatorCar("Car 1", self.elevator_panel)
        self.elevator_car.floor_changed += self.car_floor_change
コード例 #4
0
ファイル: Main.py プロジェクト: NerdWizard7/IT-Support-Ticket
 def button_OnClick(self, evt):
     btn = evt.GetEventObject().GetLabel()  # Get the name of the button and store in btn variable
     id = evt.GetEventObject().GetId()  # Get the id of the button for differentiating between admin and client
     if btn == 'Admin':  # Admin Button
         panel = Panels.AdminLogin(self)
         self.pushWinStack(panel)
         self.Layout()
     elif btn == 'Client':  # Client Button
         panel = Panels.ClientLogin(self)
         self.pushWinStack(panel)
         self.Layout()
コード例 #5
0
 def create_panel_1(self):
     #main image panel, wx.Panel to which Figure/Canvass are added
     self.patches = []
     self.image_panel = Panels.ImagePanel(self.master_panel)
     #provide a local pointer to the axis for matplotlib edits
     self.axes = self.image_panel.axes
     self.canvas = self.image_panel.canvas
コード例 #6
0
 def create_panel_4(self):
     #Creates the image control panel, sliders, color pickers etc.
     self.control_panel = Panels.ControlPanel(self.master_panel)
     self.Bind(wx.EVT_COMBOBOX,self.on_select_scheme,self.control_panel.color_scheme)
     self.Bind(wx.EVT_SLIDER, self.image_update)
     self.Bind(wx.EVT_COLOURPICKER_CHANGED, self.on_line_color,self.control_panel.color_pick)
     self.control_panel.color_pick.SetColour('#FF0000')
コード例 #7
0
	def __init__(self):
		wx.Frame.__init__(self, None, title = 'Project Manager', size = (1000, 600))
		
		self.ProjectList = wx.ListView( self, style = wx.LC_SINGLE_SEL|wx.LC_EDIT_LABELS|wx.LC_REPORT|wx.LC_NO_HEADER )
		self.Changelog = wx.richtext.RichTextCtrl(self, style = wx.VSCROLL|wx.HSCROLL|wx.NO_BORDER)
		self.Stripes = wx.Window( self, style = wx.SUNKEN_BORDER )

		self.ProjectList.Bind( wx.EVT_LIST_END_LABEL_EDIT, self.OnProjectRename )
		self.ProjectList.Bind( wx.EVT_LIST_ITEM_SELECTED, self.OnProjectSelected )
		
		self.SetToolBar(Panels.Toolbar(self))
		self.SetMenuBar(Panels.Menu(self))
		
		self.ProjectList.InsertColumn(0, '', width = 200)
		self.UpdateProjects()
		self.Bind(wx.EVT_SIZE, self.OnSize)
		self.OnSize(None)
コード例 #8
0
ファイル: Main.py プロジェクト: NerdWizard7/IT-Support-Ticket
 def login_OnClick(self, id, u, p):
     if id == 10:
         print('Client')
         valid = Credentials.passwordHasher(u, p)
         if valid == 0 or valid == 1:
             panel = Panels.ClientPanel(self, u)
             self.pushWinStack(panel)
         else:
             msg = wx.MessageBox(valid, 'Login Notice')
     elif id == 20:
         print('Admin')
         valid = Credentials.passwordHasher(u, p)
         if valid == 0:
             panel = Panels.AdminPanel(self, u)
             self.pushWinStack(panel)
         elif valid == 1:
             msg = wx.MessageBox("Looks like you aren't an administrator. Contact IT if this is an error",
                                 'Not Authotized')
         else:
             msg = wx.MessageBox(valid, 'Login Notice')
コード例 #9
0
ファイル: Gui.py プロジェクト: mantra002/flight-tracker
    def __init__(self):
        wx.Frame.__init__(self, None, title="PlaneTracker")
        panel = Panels.MainPanel(self)

        if (RUN_FULLSCREEN):
            self.ShowFullScreen(True)
            #Hide the cursor, I have a touch screen hooked up. If you want to see the cursor remove the following two lines.
            cursor = wx.Cursor(wx.CURSOR_BLANK)
            self.SetCursor(cursor)
        else:
            self.Size = (800, 510)
            self.Show()
コード例 #10
0
ファイル: R2D2.py プロジェクト: curtisblack/R2D2
    def __init__(self):
        logging.basicConfig(format="%(levelname)s (%(asctime)s): %(message)s", datefmt="%I:%M:%S %p", level=logging.INFO, filename="/var/tmp/R2D2.log")        
        GPIO.setwarnings(False)
        GPIO.setmode(GPIO.BCM)
        atexit.register(self.Exit)
        self.MCP3008 = MCP3008(spi=SPI.SpiDev(0, 0))
        self.Voltage = VoltageDivider(self.MCP3008, 0, 984.0, 101.0)
        self.Current = ACS711EX(self.MCP3008, 1)
        self.BrightnessControl = Potentiometer(self.MCP3008, 2)
        self.Battery = LiPo(self.Voltage, self.Current, 6, 10)
        
        self.DomeLightsRelay = self.Relay1 = Relay(16)
        self.DomeServosRelay = self.Relay2 = Relay(17)
        self.DomeMotorRelay = self.Relay3 = Relay(18)
        self.Relay4 = Relay(19)
        self.Relay5 = Relay(20)
        self.SoundRelay = self.Relay6 = Relay(21)
        self.BodyServosRelay = self.Relay7 = Relay(22)
        self.BodyLightsRelay = self.Relay8 = Relay(23)
        self.Relay9 = Relay(24)
        self.Relay10 = Relay(25)
        self.Relay11 = Relay(26)
        self.Relay12 = Relay(27)

        self.Network = Network()
        
        self.Head = HeadMotor(self.DomeMotorRelay)
        self.Sound = Sound()
        self.StatusDisplay = StatusDisplay(self)

        self.FrontLogicDisplay = FrontLogicDisplay(self.DomeLightsRelay)
        self.RearLogicDisplay = RearLogicDisplay(self.DomeLightsRelay)
        self.FrontProcessStateIndicator = FrontProcessStateIndicator(self.DomeLightsRelay)
        self.RearProcessStateIndicator = RearProcessStateIndicator(self.DomeLightsRelay)
        self.FrontHoloProjector = FrontHoloProjector(self.DomeLightsRelay)
        self.TopHoloProjector = TopHoloProjector(self.DomeLightsRelay)
        self.RearHoloProjector = RearHoloProjector(self.DomeLightsRelay)
        self.MagicPanel = MagicPanel(self.DomeLightsRelay)
        self.LifeFormScanner = LifeFormScanner(self.DomeServosRelay)
        self.DomePanels = Panels()
        
        self.BodyServos = Maestro("00126418")
        self.LeftUtilityArm = MaestroServo(self.BodyServos, 16, 2390, 1520, 20, 1)
        self.RightUtilityArm = MaestroServo(self.BodyServos, 17, 2390, 1520, 20, 1)
コード例 #11
0
    def __init__(self, parent, title):
        wx.Dialog.__init__(self, parent, wx.ID_ANY, title, size=(640, 480))

        self.SetSizeHintsSz(wx.DefaultSize, wx.DefaultSize)

        sizer_main = wx.FlexGridSizer(2, 1, 0, 0)
        sizer_main.AddGrowableCol(0)
        sizer_main.AddGrowableRow(0)
        sizer_main.SetFlexibleDirection(wx.BOTH)
        sizer_main.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        self.notebook = wx.Notebook(self, wx.ID_ANY, wx.DefaultPosition,
                                    wx.DefaultSize, 0)
        #self.m_panel2 = Panels.TableConfig(self.notebook) #wx.Panel( self.notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        #self.notebook.AddPage( self.m_panel2, u"Allgemein", True )
        #self.m_panel3 = Panels.TableImport(self.notebook) #wx.Panel( self.notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        #self.notebook.AddPage( self.m_panel3, u"Import", False )
        self.panel_export = Panels.TableExport(
            self.notebook
        )  #wx.Panel( self.notebook, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.TAB_TRAVERSAL )
        self.notebook.AddPage(self.panel_export, u"Export", False)

        sizer_main.Add(self.notebook, 1, wx.ALL | wx.EXPAND, 5)

        sizer_bottom = wx.FlexGridSizer(1, 3, 0, 0)
        sizer_bottom.AddGrowableCol(0)
        sizer_bottom.SetFlexibleDirection(wx.BOTH)
        sizer_bottom.SetNonFlexibleGrowMode(wx.FLEX_GROWMODE_SPECIFIED)

        sizer_bottom.AddSpacer((0, 0), 1, wx.EXPAND, 5)

        self.button_ok = wx.Button(self, wx.ID_ANY, u"Ok", wx.DefaultPosition,
                                   wx.DefaultSize, 0)
        sizer_bottom.Add(self.button_ok, 0, wx.ALL, 5)
        self.button_ok.Bind(wx.EVT_BUTTON, self.on_button_ok_clicked)

        sizer_main.Add(sizer_bottom, 1, wx.EXPAND, 5)

        self.SetSizer(sizer_main)
        self.Layout()

        self.Centre(wx.BOTH)
コード例 #12
0
ファイル: Main.py プロジェクト: NerdWizard7/IT-Support-Ticket
    def __init__(self):
        wx.Frame.__init__(self, None, wx.ID_ANY, size=(900, 600),
                          style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER ^ wx.MAXIMIZE_BOX)

        self.userId = 0

        # Set up main panel
        self.mainMenuPanel = Panels.MainMenu(self)

        self.sizer = wx.BoxSizer(wx.VERTICAL)
        self.sizer.Add(self.mainMenuPanel, 1, wx.EXPAND)

        self.winStack = []

        self.userId = None

        self.shownPanel = None
        self.shownName = ''

        self.pushWinStack(self.mainMenuPanel)
コード例 #13
0
    def create_panel_3(self):
        #Creates the image manipulation tools (rotate, crop, etc.)
        self.button_panel = Panels.ButtonPanel(self.master_panel)
        #buttons for image manipulation
        self.Bind(wx.EVT_BUTTON, self.on_rot90, self.button_panel.rot90)
        self.Bind(wx.EVT_BUTTON, self.on_rot90neg, self.button_panel.rot90neg)
        self.Bind(wx.EVT_BUTTON, self.on_flipHoriz, self.button_panel.flipHoriz)
        self.Bind(wx.EVT_BUTTON, self.on_flipVert, self.button_panel.flipVert)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.on_crop, self.button_panel.cropbut)

        #buttons for subimage/peak manipulation
        self.Bind(wx.EVT_BUTTON, self.on_duplicate, self.button_panel.duplicate)
        self.Bind(wx.EVT_BUTTON, self.on_delete, self.button_panel.delete)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.on_crop, self.button_panel.cropbut)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.on_move, self.button_panel.move)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.on_resize, self.button_panel.resize)

        self.Bind(wx.EVT_BUTTON, self.on_select_all, self.button_panel.select_all)
        self.Bind(wx.EVT_BUTTON, self.on_select_none, self.button_panel.select_none)
        self.Bind(wx.EVT_BUTTON, self.on_bck_corr, self.button_panel.background)
        self.Bind(wx.EVT_BUTTON, self.on_uniform, self.button_panel.uniform)
        self.Bind(wx.EVT_BUTTON, self.on_refresh, self.button_panel.refresh)
        self.Bind(wx.EVT_BUTTON, self.on_byteswap, self.button_panel.byteswap)
コード例 #14
0
ファイル: Main.py プロジェクト: ljthink/LaserMonitorGUI
sensorFrame = ttk.LabelFrame(rootWindow, padding="3 3 12 12", text="Sensors")
sensorFrame.grid(column=0, row=1, sticky=(tk.N, tk.W, tk.E, tk.S))
sensorFrame.columnconfigure(0, weight=1)
sensorFrame.rowconfigure(0, weight=1)

client = mqtt.Client()
client.connect("10.32.98.69", 1883, 60)
client.loop_start()

s = ttk.Style()
s.configure('Info.TLabel', font='helvetica 16')
s.configure('Data.TLabel', font='helvetica 24')
s.configure('TCheckbutton', font='helvetica 16')
s.configure('TEntry', font='helvetica 16')

PM = Panels.PanelManager()
LM = Menus.LoggingMenu(rootWindow, PM)

sensorList = []


def processSensorList(client, userdata, message):
    payload = message.payload.decode('utf-8')

    splitMessage = payload.split(",")

    sensorList.clear()

    for sensorID in splitMessage:
        if sensorID == "sensors":
            continue
コード例 #15
0
	def EditProject(self, project):
		editor = Panels.ProjectEditor(self, project)
		editor.ShowModal()
		editor.Destroy()
コード例 #16
0
	def UploadRequirement( self, name, value ):
		if not value or value == '':
			Panels.Error(self, 'Cannot Upload', '"' + name + '" has not been defined.')
		else:
			return True
コード例 #17
0
	def OnGameVersion( self, event ):
		panel = Panels.GameVersion(self, BlizzVersion)
		panel.ShowModal()
		panel.Destroy()
コード例 #18
0
ファイル: Frames.py プロジェクト: arkorsky/Client
 def __init__(self,cashMoney,GoodsData):
    wx.Frame.__init__(self, None, -1, u"收款明细",size=(800,600),style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
    self.Bind(wx.EVT_CLOSE,self.ClosegetMoneyFrame)
    self.Centre()
    Panels.getMoneyPage(self,cashMoney,GoodsData)
    self.Show()
コード例 #19
0
ファイル: Frames.py プロジェクト: arkorsky/Client
 def __init__(self):
      wx.Frame.__init__(self, None, -1, u"打印配置",size=(600,600),style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
      self.Bind(wx.EVT_CLOSE,self.closeprintConfigFrame)
      self.Centre()
      Panels.printConfigPage(self)
      self.Show()
コード例 #20
0
	def OnUserKey(self, event):
		panel = Panels.UserKey(self, UserKey)
		panel.ShowModal()
		panel.Destroy()
コード例 #21
0
ファイル: test_bokeh.py プロジェクト: dwcoder/WaldAirplanes
import json
from pprint import pprint as pp

with open('Parser/data_shapes.json') as json_data:
    d = json.load(json_data)
    json_data.close()

list_of_polys = []
for key, value in d.items():
    list_of_polys.append(value)

import Panels
reload(Panels)

A = Panels.panel(list_of_polys[0])

plane = Panels.plane(list_of_polys=list_of_polys)

plane.fix_ref_location(-100, -100)
plane.fix_ref_rotation(np.pi / 2)

if False:
    fig, ax = plt.subplots()

    coll = PolyCollection(plane.current(), edgecolors='black')
    ax.add_collection(coll)

    for i in range(1, 10):

        plane.move_forward(140)
コード例 #22
0
 def create_panel_2(self):
     #the subimage list/action panel - grid and lots of buttons
     self.si_panel = Panels.SIlistPanel(self.master_panel)
     self.grid = self.si_panel.grid
     self.si_button_list = self.si_panel.si_button_list
     self.Bind(wx.EVT_BUTTON, self.on_copy, self.si_panel.copy_but)