Index: src/dat/layout.json
===================================================================
--- src/dat/layout.json	(revision a9f322be3fef0a77e1636ffea4d61a463722a52a)
+++ src/dat/layout.json	(revision 23ffb363623057f4809b838ddcbbe9a214fab100)
@@ -1,1 +1,1 @@
-{"mainWidth": 951, "firstLayout": 1, "mainHeight": 465}
+{"mainWidth": 951, "firstLayout": 1, "mainHeight": 457}
Index: src/main.py
===================================================================
--- src/main.py	(revision a9f322be3fef0a77e1636ffea4d61a463722a52a)
+++ src/main.py	(revision 23ffb363623057f4809b838ddcbbe9a214fab100)
@@ -1,5 +1,4 @@
 '''
 Created on 2015.5.5
-@author: yll
 '''
 
@@ -16,49 +15,6 @@
 from viewer.mainTab import *
 from viewer.subTab import *
-
-class myMenuBar(QtGui.QMenuBar):
-    def __init__(self, parent=None):
-        super(myMenuBar,self).__init__(parent)
-        self.CreateMenuBar()
-        self.open_action.triggered.connect(self.file_open)
-
-    def CreateMenuBar(self):
-
-        self.file_menu = self.addMenu("File(&F)")
-        self.edit_menu = self.addMenu("Edit(&E)")
-        self.help_menu = self.addMenu("Help(&H)")
-
-        self.open_action = self.file_menu.addAction("Open")
-        self.save_action = self.file_menu.addAction("Save")
-        self.exit_action = self.file_menu.addAction("Exit")
-        icon = QtGui.QIcon()
-        icon.addPixmap(QtGui.QPixmap("icon/open.jpg"),QtGui.QIcon.Normal,QtGui.QIcon.Off)
-        self.open_action.setIcon(icon)
-        self.open_action.setShortcut(QtCore.QCoreApplication.translate("MainWindow","Ctrl+O"))
-        icon2 = QtGui.QIcon()
-        icon2.addPixmap(QtGui.QPixmap("icon/save.jpg"),QtGui.QIcon.Normal,QtGui.QIcon.Off)
-        self.save_action.setIcon(icon2)
-        self.save_action.setShortcut(QtCore.QCoreApplication.translate("MainWindow","Ctrl+S"))
-        icon3 = QtGui.QIcon()
-        icon3.addPixmap(QtGui.QPixmap("icon/exit.jpg"),QtGui.QIcon.Normal,QtGui.QIcon.Off)
-        self.exit_action.setIcon(icon3)
-        self.exit_action.setShortcut(QtCore.QCoreApplication.translate("MainWindow","Ctrl+P"))
-
-        self.cut_action = self.edit_menu.addAction("Cut")
-        self.copy_action = self.edit_menu.addAction("Copy")
-        self.past_action = self.edit_menu.addAction("Paste")
-
-    def file_open(self):
-        fileName = QtGui.QFileDialog.getOpenFileName(self,("title"),("./"),(""))#,None)
-        print('fileName:',fileName)
-        #print(selectedFilter)
-
-class myStatusBar(QtGui.QStatusBar):
-    def __init__(self, parent=None):
-        super(myStatusBar,self).__init__(parent)
-        self.CreateStatusBar()
-
-    def CreateStatusBar(self):
-        pass
+from viewer.menuBar import *
+from viewer.statusBar import *
 
 class mywindow(QtGui.QMainWindow):
@@ -70,8 +26,8 @@
     def setupUi(self,MainWindow):
 
-        self.myMenuBar = myMenuBar(self)
+        self.myMenuBar = menuBar(self)
         self.setMenuBar(self.myMenuBar)
 
-        self.myStatusBar = myStatusBar(self)
+        self.myStatusBar = statusBar(self)
         self.setStatusBar(self.myStatusBar)
 
Index: src/viewer/menuBar.py
===================================================================
--- src/viewer/menuBar.py	(revision 23ffb363623057f4809b838ddcbbe9a214fab100)
+++ src/viewer/menuBar.py	(revision 23ffb363623057f4809b838ddcbbe9a214fab100)
@@ -0,0 +1,164 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# configure
+
+'''
+MenuBar
+
+Created on 2015.12.18
+'''
+
+from conf.constants import *
+
+import thread
+import threading
+import time
+import random
+#from model.globalClass import *
+#from model.diffractionSimulator import *
+from viewer.canvas import *
+#from viewer.chopperSetting import *
+#from viewer.serverSetting import *
+
+
+class menuBar(QtGui.QMenuBar):
+
+    def __init__(self, parent=None):
+        super(menuBar, self).__init__(parent)
+        self.parent = parent
+        self.CreateMenuBar()
+        self.open_action.triggered.connect(self.file_open)
+        self.save_action.triggered.connect(self.file_save)
+        self.exit_action.triggered.connect(self.exit_program)
+        self.dataStreaming_action.triggered.connect(self.serverSetting)
+        self.offlineData_action.triggered.connect(self.offline_data)
+        self.diffractionSimulator_action.triggered.connect(self.diffraction_simulator)
+        self.protonSimulator_action.triggered.connect(self.proton_simulator)
+        self.choppersetting_action.triggered.connect(self.chopperSetting)
+
+        self.IP = 'localhost'
+        self.Port = 9999
+
+    def CreateMenuBar(self):
+
+        self.file_menu = self.addMenu('&File')
+        self.edit_menu = self.addMenu('Edit(&E)')
+        self.option_menu = self.addMenu('Options(&O)')
+        self.help_menu = self.addMenu('Help(&H)')
+
+        self.open_action = self.file_menu.addAction('Open')
+        self.save_action = self.file_menu.addAction('Save')
+        self.exit_action = self.file_menu.addAction('Exit')
+        icon = QtGui.QIcon()
+        icon.addPixmap(QtGui.QPixmap('icon/open.jpg'),
+                       QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.open_action.setIcon(icon)
+        self.open_action.setShortcut('Ctrl+O')  # QtCore.QCoreApplication.translate('MainWindow' , 'Ctrl+O'))
+        icon2 = QtGui.QIcon()
+        icon2.addPixmap(QtGui.QPixmap('icon/save.jpg'),
+                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.save_action.setIcon(icon2)
+        self.save_action.setShortcut(QtCore.QCoreApplication.translate('MainWindow'
+                , 'Ctrl+S'))
+        icon3 = QtGui.QIcon()
+        icon3.addPixmap(QtGui.QPixmap('icon/exit.jpg'),
+                        QtGui.QIcon.Normal, QtGui.QIcon.Off)
+        self.exit_action.setIcon(icon3)
+        self.exit_action.setShortcut(QtCore.QCoreApplication.translate('MainWindow'
+                , 'Ctrl+P'))
+
+        self.cut_action = self.edit_menu.addAction('Cut')
+        self.copy_action = self.edit_menu.addAction('Copy')
+        self.past_action = self.edit_menu.addAction('Paste')
+
+        # Add child menu for Option Menu
+
+        self.selectDataSources_menu = \
+            self.option_menu.addMenu('Select Data Sources')
+        self.choppersetting_action = \
+            self.option_menu.addAction('Chopper Setting')
+
+        # Add child menu for Select Data Sources Menu
+
+        self.dataStreaming_action = \
+            self.selectDataSources_menu.addAction('Data Streaming')
+        self.offlineData_action = \
+            self.selectDataSources_menu.addAction('Offline Data')
+        self.diffractionSimulator_action = \
+            self.selectDataSources_menu.addAction('Diffraction Simulator'
+                )
+        self.protonSimulator_action = \
+            self.selectDataSources_menu.addAction('Proton Simulator')
+
+    def getIP(self):
+        try:
+            self.serversetting_dialog
+        except:
+
+            # print "WARNING: NEON server not setup."
+
+            return self.IP
+
+        return self.serversetting_dialog.getIP()
+
+    def getPort(self):
+        try:
+            self.serversetting_dialog
+        except:
+
+            # print "WARNING: NEON server not setup."
+
+            return self.Port
+
+        return self.serversetting_dialog.getPort()
+
+    def serverSetting(self):
+        self.serversetting_dialog = CSNSServerSetting(self)
+        self.serversetting_dialog.show()
+
+    def chopperSetting(self):
+        self.choppersetting_dialog = CSNSChopperSetting()
+        self.choppersetting_dialog.show()
+
+    def file_open(self):
+        fileName = QtGui.QFileDialog.getOpenFileName(self, 'title', './'
+                , '')  # ,None)
+        file = open(fileName, 'r')
+
+        with file:
+            text = file.read()
+
+    def file_save(self):
+        filePath = QtGui.QFileDialog.getSaveFileName(self, 'Save File',
+                '/opt/shared/home/yanll/GPPDfly/src/dat/save.txt')
+
+        if len(filePath) > 0:
+            with open(filePath, 'w') as theFile:
+                theFile.write('save as string')
+            print theFile
+
+    def exit_program(self):
+        QtGui.qApp.quit()
+
+    def offline_data(self):
+
+        print 'Offline Data'
+
+    def diffraction_simulator(self):
+        self.parent.updateDiffractionSimulator()
+
+    def setIP(self, IP):
+        self.IP = IP
+
+    def setPort(self, Port):
+        self.Port = Port
+
+    def data_streaming(self):
+        self.parent.updateDataStreaming()
+
+    def proton_simulator(self):
+        _threadID = 101
+        self.parent.updateProton(_threadID)
+
+
Index: src/viewer/statusBar.py
===================================================================
--- src/viewer/statusBar.py	(revision 23ffb363623057f4809b838ddcbbe9a214fab100)
+++ src/viewer/statusBar.py	(revision 23ffb363623057f4809b838ddcbbe9a214fab100)
@@ -0,0 +1,31 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+# configure
+
+'''
+StatusBar
+
+Created on 2015.12.18
+'''
+
+from conf.constants import *
+
+
+class statusBar(QtGui.QStatusBar):
+
+    def __init__(self, parent=None):
+        super(statusBar, self).__init__(parent)
+        self.CreateStatusBar()
+
+    def CreateStatusBar(self):
+        self.setFixedHeight(18)
+
+        # self.showMessage("Ready")
+
+        label = QtGui.QLabel('System Status | Normal')
+        label.setStyleSheet(' QLabel {color: red}')
+        self.addWidget(label)
+        self.repaint()
+
+
