Skip to content

Commit

Permalink
optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Jul 21, 2017
1 parent 269e364 commit 6eb2290
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PySerialAssistant
========
A cross platform serial debug tools written by python
![screenshot](./assets/screenshot_V1.0.png)
> screenshot shows the version 1.0, the newest may not the same totally! But better performance、more easy to use and more elegant
> screenshot shows the version 1.0, the latest may not the same totally! But better performance、more easy to use and more elegant
## Features

Expand Down
5 changes: 3 additions & 2 deletions src/autoUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from PyQt5.QtWidgets import QMessageBox

class AutoUpdate:
updateUrl = "https://github.com/Neutree/PySerialAssist/releases"
updateUrl = "https://github.com/Neutree/PyserialAssistant/releases"
def detectNewVersion(self):
try:
page = urllib.request.urlopen(self.updateUrl)
Expand All @@ -20,7 +20,8 @@ def detectNewVersion(self):
return False
except Exception as e:
print("error:",e)
print("Get newest version failed!")
return False
print("Already latest version!")
return False

def OpenBrowser(self):
Expand Down
8 changes: 6 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import sys
import sys,os
from src import parameters,Combobox,helpAbout,autoUpdate
from PyQt5.QtCore import pyqtSignal,Qt
from PyQt5.QtWidgets import (QApplication, QWidget,QToolTip,QPushButton,QMessageBox,QDesktopWidget,QMainWindow,
Expand Down Expand Up @@ -193,7 +193,7 @@ def initWindow(self):

self.resize(800, 500)
self.MoveToCenter()
self.setWindowTitle(parameters.appName)
self.setWindowTitle(parameters.appName+" V"+str(helpAbout.versionMajor)+"."+str(helpAbout.versionMinor))
self.setWindowIcon(QIcon(parameters.appIcon))
self.show()
return
Expand Down Expand Up @@ -564,6 +564,10 @@ def autoUpdateDetect(self):
if auto.detectNewVersion():
auto.OpenBrowser()

def openDevManagement(self):
os.system('echo aaaa')
os.system('start devmgmt.msc')



if __name__ == '__main__':
Expand Down

0 comments on commit 6eb2290

Please sign in to comment.