equal
deleted
inserted
replaced
12 from datetime import datetime |
12 from datetime import datetime |
13 from weakref import WeakKeyDictionary |
13 from weakref import WeakKeyDictionary |
14 |
14 |
15 import targets |
15 import targets |
16 import connectors |
16 import connectors |
17 from util.misc import opjimg, CheckPathPerm, GetClassImporter |
17 from util.misc import CheckPathPerm, GetClassImporter |
18 from util.MiniTextControler import MiniTextControler |
18 from util.MiniTextControler import MiniTextControler |
19 from util.ProcessLogger import ProcessLogger |
19 from util.ProcessLogger import ProcessLogger |
20 from PLCControler import PLCControler |
20 from PLCControler import PLCControler |
21 from PLCOpenEditor import CWD |
|
22 from TextViewer import TextViewer |
21 from TextViewer import TextViewer |
23 from plcopen.structures import IEC_KEYWORDS |
22 from plcopen.structures import IEC_KEYWORDS |
24 from targets.typemapping import DebugTypesSize |
23 from targets.typemapping import DebugTypesSize |
25 from util.discovery import DiscoveryDialog |
24 from util.discovery import DiscoveryDialog |
26 from ConfigTreeNode import ConfigTreeNode |
25 from ConfigTreeNode import ConfigTreeNode |
180 return self.ProjectPath |
179 return self.ProjectPath |
181 |
180 |
182 def GetProjectName(self): |
181 def GetProjectName(self): |
183 return os.path.split(self.ProjectPath)[1] |
182 return os.path.split(self.ProjectPath)[1] |
184 |
183 |
185 def GetIconPath(self): |
184 def GetIconName(self): |
186 return os.path.join(CWD, "Images", "PROJECT.png") |
185 return "PROJECT" |
187 |
186 |
188 def GetDefaultTargetName(self): |
187 def GetDefaultTargetName(self): |
189 if wx.Platform == '__WXMSW__': |
188 if wx.Platform == '__WXMSW__': |
190 return "Win32" |
189 return "Win32" |
191 else: |
190 else: |
313 values.append( |
312 values.append( |
314 {"name": "%s: %s" % (CTNChild.GetFullIEC_Channel(), |
313 {"name": "%s: %s" % (CTNChild.GetFullIEC_Channel(), |
315 CTNChild.CTNName()), |
314 CTNChild.CTNName()), |
316 "type": ITEM_CONFNODE, |
315 "type": ITEM_CONFNODE, |
317 "confnode": CTNChild, |
316 "confnode": CTNChild, |
318 "icon": CTNChild.GetIconPath(), |
317 "icon": CTNChild.GetIconName(), |
319 "values": self.RecursiveConfNodeInfos(CTNChild)}) |
318 "values": self.RecursiveConfNodeInfos(CTNChild)}) |
320 return values |
319 return values |
321 |
320 |
322 def GetProjectInfos(self): |
321 def GetProjectInfos(self): |
323 infos = PLCControler.GetProjectInfos(self) |
322 infos = PLCControler.GetProjectInfos(self) |