Ejemplo n.º 1
0
	def TryConnect(self):
		self.tryCount += 1
		if self.tryCount > self._connect_try : 
			OutputWindow().notice(u"테스터와의 연결이 실패하였습니다.")
			RemoteClient._disconnect_()
			return
			
		self.connectToHost(self.HOST,self.PORT);
		if self.waitForConnected(5000):
			pass
		else:
			self.live = False
			QTimer.singleShot(1500,self.TryConnect)
			OutputWindow().notice(u"연결중...")
Ejemplo n.º 2
0
    def afterCompileProj(failFiles, inst):
        OutputWindow().notice(u"테스트 플레이를 위한 컴파일 끝.")
        OutputWindow().notice(u"파일 복사 중.")
        msgBox.setText(u"파일 복사중...")

        dispath = user_data_dir("pini_remote", "") + "/"
        BUILDPATH = ProjectController().path + "/build/"
        BUILDPATH = BUILDPATH.replace("\\", "/")

        print BUILDPATH

        if clean:
            try:
                shutil.rmtree(dispath)
            except Exception, e:
                pass
Ejemplo n.º 3
0
	def sendFile(self,fpath,dist,fname):
		if self.live : 
			fp = QFile( fpath )
			fp.open( QFile.ReadOnly )
			fbyte = fp.readAll()
			fp.close()

			byte = QByteArray()

			dist = dist.replace("\\","/")

			s1 = QByteArray.number(len(dist))
			s1.resize(4)

			dist = QByteArray(dist)
			
			s2 = QByteArray.number(len(fname))
			s2.resize(4)
			
			fname = QByteArray(fname)

			byte.append(s1)
			byte.append(dist)
			byte.append(s2)
			byte.append(fname)
			byte.append(fbyte)

			self.send("tran",byte)
			OutputWindow().notice(u"파일 전송:"+fpath)
Ejemplo n.º 4
0
	def step7(self):
		from view.OutputWindow import OutputWindow
		from view.VariableViewWindow import VariableViewWindow
		m = NoriterMain()
		##### VIEWS!! ######
		OutputWindow(m).hide()
		VariableViewWindow().hide()
Ejemplo n.º 5
0
    def __init__(self, parent=None):
        self.view = None
        super(SceneDocument, self).__init__(parent)

        self.sceneListCtrl = SceneListController.getInstance()
        self.sceneListCtrl.SceneOpen.connect(self.openScene)
        self.sceneListCtrl.SceneLoaded.connect(self.loadScene)

        self.sceneCtrl = None

        OutputWindow().noticed.connect(self.noticeLog)
Ejemplo n.º 6
0
	def send(self,order,payload):
		if self.live : 
			header=QByteArray(order)
			header.resize(4)

			s_size = str(payload.size())
			size=QByteArray(s_size+" "*(11-len(s_size)))

			#print ">>>>>>>>>>>>>>>>>>>>>>>"
			print "\"",header,"\"",self.write(header)
			print "\"",size,"\"",self.write(size)
			print "payload",self.write(payload)

			OutputWindow().notice(u"리모트 데이터 전송:"+order+" ["+str(payload.size())+"]")
Ejemplo n.º 7
0
def Save(showAleart=False, discard=None):
    inst = ProjectController()
    if len(inst.path) == 0:
        return

    if showAleart:
        flag = QMessageBox.Save
        if discard:
            flag = flag | QMessageBox.Discard
        flag = flag | QMessageBox.Cancel

        sceneScriptWindowManager = SceneScriptWindowManager.getInstance()
        currentFileName = sceneScriptWindowManager.getActiveFilename()

        if currentFileName == None:
            return -1

        msgBox = QMessageBox()
        msgBox.setText(u"저장")
        msgBox.setInformativeText(currentFileName + u"을(를) 저장하시겠습니까?")
        msgBox.setStandardButtons(flag)
        msgBox.setDefaultButton(QMessageBox.Cancel)
        msgBox.setIcon(QMessageBox.Warning)
        ret = msgBox.exec_()

        if ret == QMessageBox.Save:
            sceneScriptWindowManager.saveActiveScene()
        elif ret == QMessageBox.Discard:
            return -1
        elif ret == QMessageBox.Cancel:
            return 0
    else:
        sceneScriptWindowManager = SceneScriptWindowManager.getInstance()
        sceneScriptWindowManager.saveActiveScene()

    OutputWindow().notice(u"파일이 저장되었습니다.")
    return 1
Ejemplo n.º 8
0
def OpenLogWindow():
    from view.OutputWindow import OutputWindow
    OutputWindow().show()
Ejemplo n.º 9
0
                pass
            try:
                shutil.copytree(APPPATH + "/../VisNovel/src", APPPATH + "/src")
            except Exception, e:
                pass
            try:
                shutil.copytree(APPPATH + "/../VisNovel/res", APPPATH + "/res")
            except Exception, e:
                pass

        else:
            APPPATH = "window"

    print APPPATH
    ####### run !!!!!
    OutputWindow().notice("RUN : " + APPPATH)
    OutputWindow().notice(u"테스트 플레이를 위한 컴파일 시작")

    msgBox = CompileProgressWindow(NoriterMain())
    msgBox.setWindowFlags(Qt.Window | Qt.WindowTitleHint
                          | Qt.CustomizeWindowHint)
    msgBox.show()
    msgBox.setText(u"초기화 중...")

    def afterCompileProj(failFiles, inst):
        OutputWindow().notice(u"테스트 플레이를 위한 컴파일 끝.")
        OutputWindow().notice(u"파일 복사 중.")
        msgBox.setText(u"파일 복사중...")

        dispath = user_data_dir("pini_remote", "") + "/"
        BUILDPATH = ProjectController().path + "/build/"
Ejemplo n.º 10
0
	def onConnected(self):
		self.live = True
		OutputWindow().notice(u"테스트 실행 연결.")
		self.run()