private void Initialize()
        {
            _debugView.ShowInTaskbar = false;
            _windowUtility.ShowInTaskbar = false;
            SetSubWindowKeyBinding(_debugView, Key.F1, ModifierKeys.Control);
            SetSubWindowKeyBinding(_windowUtility, Key.F10, ModifierKeys.Control);

            frameMainView.NavigationUIVisibility = NavigationUIVisibility.Hidden;
            _alarmFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden;
            _emergencyFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden;

            _mainButton = AddBottomMenuButton(GridBottomMenu, "MAIN", _formMain);
            _manualButton = AddBottomMenuButton(GridBottomMenu, "MANUAL", _formManual);
            _configButton = AddBottomMenuButton(GridBottomMenu, "CONFIG", _formConfig);
            _logButton = AddBottomMenuButton(GridBottomMenu, "LOG", _formLog);
            //AddBottomMenuColumn(GridBottomMenu, 100);
            //_configButton.Visibility = System.Windows.Visibility.Collapsed;
            _logButton.Visibility = System.Windows.Visibility.Collapsed;
            _exitButton = AddBottomMenuButton(GridBottomMenu, "EXIT",
                delegate(object sender, RoutedEventArgs e)
                {
                    if (MessageBox.Show(Manager.StringResourceManager.Instance.Resource.System.PGMExit, "", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                    {
                        _allowClose = true;
                        LogManager.Instance.WriteTraceLog("TERMINATE PGM");
                        Equipment.EquipmentManager.Instance.StopMachine();
                        Close();
                    }
                });

            _logButton.Click +=
                delegate(object sender, RoutedEventArgs e)
                {
                    _formLog.OnShowEvent();
                };

            StringResourceManager.Instance.OnChangedLanguage += EventHandlerLanguageChanged;

            _mainGrid = (Grid)frameBase.Content;

            _pageAlarm  = new Forms.PageAlarm();
            _alarmFrame.Content = _pageAlarm;

            _pageEmergency = new Forms.PageEmergency();
            _emergencyFrame.Content = _pageEmergency;
            _pageEmergency.Initialize();
            _pageEmergency.ResetEventHandler +=
                delegate(object sender, EventArgs e)
                {
                    ShowPage(_formMain);
                };

            _pageAlarm.ClickAlarmClear += JamClear;

            FAAlarmManager.Instance.OnRaiseAlarm += EventHandlerOnAlarm;

            try
            {
                Equipment.EquipmentManager.Instance.InitializeMachine();
                Equipment.EquipmentManager.Instance.MainEquip.OnStatusChanged += EventHandlerStatusChanged;
                Equipment.EquipmentManager.Instance.MainEquip.OnUserChanged += EventHandlerUserChanged;
                Equipment.EquipmentManager.Instance.MainEquip.OnJamClear += JamClear;
                Equipment.EquipmentManager.Instance.MainEquip.OnTestModeChanged += EventHandlerTestModeChanged;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                Close();
            }

            try
            {
                Equipment.EquipmentManager.Instance.OnEmergency +=
                    delegate(object sender, EventArgs e)
                    {
                        ShowEmergency();
                    };

                Equipment.EquipmentManager.Instance.OnResetEmergency +=
                    delegate(object sender, EventArgs e)
                    {
                        ShowPage(_formMain);
                    };

                if (Equipment.EquipmentManager.USE_DEBUG_VIEW)
                    _debugView.AddItem(Equipment.EquipmentManager.Instance, "Main");
                _windowUtility.Initialize();
                _formMain.Initialize();
                _formManual.Initialize();
                _formConfig.Initialize();
                _formLog.Initialize();
                UIUtility.SetFocusEventHandlerToTextBox(this);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                Close();
            }

            try
            {
                Equipment.EquipmentManager.Instance.StartMachine();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                Close();
                return;
            }

            _configButton.IsEnabled = false;
            _manualButton.IsEnabled = false;

            WindowEngineerCall.OnReleasedEngineerCall += OnReleasedEngineerCall;
            Equipment.EquipmentManager.Instance.MainEquip.CurrentUser = Equipment.StandardEquipment.UserPermission.OPERATOR;
            LogManager.Instance.IsEnabledTraceLog = true;
            LogManager.Instance.WriteTraceLog("START PGM");

            ShowPage(_formMain);
        }
        private void Initialize()
        {
            _debugView.ShowInTaskbar = false;

            SetDebugViewKeyBinding();

            frameMainView.NavigationUIVisibility = NavigationUIVisibility.Hidden;

            _mainButton = AddBottomMenuButton(GridBottomMenu, "MAIN", _formMain);
            _manualButton = AddBottomMenuButton(GridBottomMenu, "MANUAL", _formManual);
            _configButton = AddBottomMenuButton(GridBottomMenu, "CONFIG", _formConfig);
            _logButton = AddBottomMenuButton(GridBottomMenu, "LOG", _formLog);
            AddBottomMenuColumn(GridBottomMenu, 100);
            _exitButton = AddBottomMenuButton(GridBottomMenu, "EXIT",
                delegate(object sender, RoutedEventArgs e)
                {
                    if (MessageBox.Show("종료하시겠습니까?", "", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
                    {
                        //_formMain.StopTimer();
                        LogManager.Instance.WriteTraceLog("TERMINATE PGM");
                        Equipment.EquipmentManager.Instance.StopMachine();
                        Close();
                    }
                });

            _logButton.Click +=
                delegate(object sender, RoutedEventArgs e)
                {
                    _formLog.OnShowEvent();
                };

            _mainGrid = (Grid)frameBase.Content;

            _pageAlarm  = new Forms.PageAlarm();
            _alarmFrame.Content = _pageAlarm;

            _pageEmergency = new Forms.PageEmergency();
            _emergencyFrame.Content = _pageEmergency;
            _pageEmergency.Initialize();
            _pageEmergency.ResetEventHandler +=
                delegate(object sender, EventArgs e)
                {
                    ShowPage(_formMain);
                };

            _pageAlarm.ClickAlarmClear += JamClear;

            LogManager.Instance.OnWriteTraceLog += delegate(object sender, LogEventArgs e)
            {
                _formMain.AddLog(e.Date, e.Log);
            };

            FAAlarmManager.Instance.OnRaiseAlarm += EventHandlerOnAlarm;

            try
            {
                Equipment.EquipmentManager.Instance.InitializeMachine();
                Equipment.EquipmentManager.Instance.MainEquip.OnStatusChanged += EventHandlerStatusChanged;
                Equipment.EquipmentManager.Instance.MainEquip.OnUserChanged += EventHandlerUserChanged;
                Equipment.EquipmentManager.Instance.MainEquip.OnJamClear += JamClear;
                Equipment.EquipmentManager.Instance.MainEquip.OnTestModeChanged += EventHandlerTestModeChanged;
                Equipment.EquipmentManager.Instance.OnChangedShift += delegate(object sender, EventArgs e) { _formMain.ClearTraceLog(); };
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                Close();
            }

            try
            {
                Equipment.EquipmentManager.Instance.MainEquip.OnUserChanged += _formMain.OnUserChanged;
                Equipment.EquipmentManager.Instance.OnEmergency +=
                    delegate(object sender, EventArgs e)
                    {
                        ShowEmergency();
                    };

                Equipment.EquipmentManager.Instance.OnResetEmergency +=
                    delegate(object sender, EventArgs e)
                    {
                        ShowPage(_formMain);
                    };

                _debugView.AddItem(Equipment.EquipmentManager.Instance, "Main");
                _formMain.Initialize();
                _formManual.Initialize();
                _formConfig.Initialize();
                _formLog.Initialize();
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
                Close();
            }

            Equipment.EquipmentManager.Instance.EventHandlerAllwaysCheck += EventHandlerAllwaysCheck;
            Equipment.EquipmentManager.Instance.StartMachine();
            Equipment.EquipmentManager.Instance.MainEquip.CurrentUser = Equipment.StandardSubEquipment.UserPermission.OPERATOR;
            LogManager.Instance.IsEnabledTraceLog = true;
            LogManager.Instance.WriteTraceLog("START PGM");

            ShowPage(_formMain);
        }