Skip to content

Commit

Permalink
ajustes
Browse files Browse the repository at this point in the history
  • Loading branch information
eljavatar committed Sep 21, 2018
1 parent 9cc5a0a commit 6775ea0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ def cargarDatosAndReturnR(ruta):
listDFToValidate.append(df)

r.dataT = datos["R"]["T"]
for i in range(0, len(r.dataT)):
r.dataT[i] = r.dataT[i].strip()
r.dataT.sort()

r.dependencias = listDF
r.dfToValidate = listDFToValidate

Expand Down
7 changes: 4 additions & 3 deletions Vista.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def fillData():
def loadFile():
try:
root.filename = filedialog.askopenfilename(initialdir = "",title = "Select file",filetypes = (("JSON files","*.json"),("all files","*.*")))
#root.filename = filedialog.askopenfilename(initialdir = "/",title = "Select file",filetypes = (("JSON files","*.json"),("all files","*.*"))) # Disco C
if not messagebox.askyesno(title = "Mensaje de Confirmación", message = "Al cargar este archivo, se sobreescribirán las\nvariables de entrada del conjunto R(T, L)\n¿Está seguro de continuar?"):
return
#root.filename = filedialog.askopenfilename(initialdir = "",title = "Select file",filetypes = (("JSON files","*.json"),("all files","*.*"))) # Disco C
pathFile.set(root.filename)
dataLoad = utils.cargarDatosAndReturnR(root.filename);
r.dataT = dataLoad.dataT.copy()
Expand Down Expand Up @@ -79,6 +79,7 @@ def cleanDependencias():
listDF.clear()
for i in tableDependencias.get_children():
tableDependencias.delete(i)
r.dfToValidate = []


def calcularRecubrimientoMinimo():
Expand All @@ -101,7 +102,7 @@ def calcularRecubrimientoMinimo():

def initForm():
root.title("Recubrimiento Mínimo")
root.resizable(True, True)
root.resizable(False, False)
#root.iconbitmap("ruta.ico")


Expand Down Expand Up @@ -157,7 +158,7 @@ def initForm():

tableDependencias.configure(yscrollcommand = scrollbar_vertical.set)

buttonCleanDF = Button(frameDF, text = "Limpir Dependencias", font = textFont, command = cleanDependencias)
buttonCleanDF = Button(frameDF, text = "Limpiar Dependencias", font = textFont, command = cleanDependencias)
buttonCleanDF.grid(row = 1, column = 0, padx = 5, pady = 5)


Expand Down
2 changes: 1 addition & 1 deletion datos.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"R":{
"T":["a","b","c","d","e","f","g"],
"T":["a","b","c","d","e","g","f"],
"L":[
{"impX":"a", "impY":"b"},
{"impX":"a", "impY":"d"},
Expand Down

0 comments on commit 6775ea0

Please sign in to comment.