create doc directory and add about.html + manual_beremiz.pdf
authorgreg
Fri, 29 Feb 2008 12:03:45 +0100
changeset 120 8c3150858dd3
parent 119 f3819d2e8eff
child 121 ccb1812f8323
create doc directory and add about.html + manual_beremiz.pdf
implement beremiz helpMenu
Beremiz.py
doc/about.html
doc/manual_beremiz.pdf
--- a/Beremiz.py	Thu Feb 28 18:12:16 2008 +0100
+++ b/Beremiz.py	Fri Feb 29 12:03:45 2008 +0100
@@ -60,10 +60,15 @@
     splash=wx.SplashScreen(bmp,wx.SPLASH_CENTRE_ON_SCREEN, 1000, None)
     wx.Yield()
 
-import wx.lib.buttons, wx.lib.statbmp 
+import wx.lib.buttons, wx.lib.statbmp , wx.html
 import types, time, re, platform, time, traceback, commands
 
 from plugger import PluginsRoot
+base_folder = os.path.split(sys.path[0])[0]
+CanFestivalPath = os.path.join(base_folder, "CanFestival-3")
+sys.path.append(os.path.join(CanFestivalPath, "objdictgen"))
+from objdictedit import *
+from doc_index.DS301_index import *
 
 SCROLLBAR_UNIT = 10
 WINDOW_COLOUR = wx.Colour(240,240,240)
@@ -199,7 +204,7 @@
 ] = [wx.NewId() for _init_coll_HelpMenu_Items in range(2)]
 
 class Beremiz(wx.Frame):
-    
+	
     def _init_coll_FileMenu_Items(self, parent):
         parent.Append(help='', id=ID_BEREMIZFILEMENUITEMS0,
               kind=wx.ITEM_NORMAL, text=u'New\tCTRL+N')
@@ -1179,9 +1184,18 @@
         event.Skip()
     
     def OnBeremizMenu(self, event):
+        if wx.Platform == '__WXMSW__':
+            readerpath = get_acroversion()
+            readerexepath = os.path.join(readerpath,"AcroRd32.exe")
+            if(os.path.isfile(readerexepath)):
+                os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(CWD,"doc","manual_beremiz.pdf"))
+        else:
+            os.system("xpdf -remote BEREMIZ %s %d &"%(os.path.join(CWD,"doc","manual_beremiz.pdf",16)))
         event.Skip()
     
     def OnAboutMenu(self, event):
+        about_html = objdictedit(self)
+        about_html.OpenHtmlFrame("About Beremiz", os.path.join(CWD,"doc","about.html"),wx.Size(500,600))
         event.Skip()
     
     def OnAddButton(self, event):
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/about.html	Fri Feb 29 12:03:45 2008 +0100
@@ -0,0 +1,36 @@
+<HTML>
+<BODY>
+<CENTER>
+<IMG SRC="../images/splash.png">
+<BR><BR>
+<font size="3">Beremiz is an Open Source framework for automation.</font>
+<BR><BR>
+<a href="http://www.beremiz.org/">http://www.beremiz.org/</a>
+<BR><BR>
+Copyright ©: Edouard TISSERANT, Laurent BESSARD
+<BR><BR>
+Version: PRE-ALPHA
+<BR><BR>
+<TABLE border="0">
+  <TR>
+    <TD align="right" valign="top">
+      Contributor :
+    </TD>
+    <TD align="left" valign="top">
+      University of Porto<BR>
+      <a href="http://www.fe.up.pt/si/web_page.inicial">http://www.fe.up.pt/si/web_page.inicial</a>
+    </TD>
+  </TR>
+  <TR>
+    <TD align="right" valign="top">
+      Supported by :
+    </TD>
+    <TD align="left" valign="top">
+      LOLITech<BR>
+      <a href="http://www.lolitech.fr">http://www.lolitech.fr</a>
+    </TD>
+  </TR>
+</TABLE>
+</CENTER>
+</BODY>
+</HTML>
\ No newline at end of file
Binary file doc/manual_beremiz.pdf has changed