Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            // Create directories
            ConfigData config = new ConfigData()
            {
                AppConfig    = AppConfig.Load(),
                DevConfig    = DevConfig.Load(),
                KeyMapConfig = KeyMapConfig.Load(),
                SysMessage   = SysMessage.Load()
            };

            ConfigData.Initialize(config);

            PD17();
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        static bool AppInitialize()
        {
            var exists = AppConfig.Exists() &&
                         DevConfig.Exists() &&
                         KeyMapConfig.Exists();

            exists &= MasterDbHelper.DbExists() && TranDbHelper.DbExists();

            if (exists)
            {
                // Create directories
                ConfigData config = new ConfigData()
                {
                    AppConfig    = AppConfig.Load(),
                    DevConfig    = DevConfig.Load(),
                    KeyMapConfig = KeyMapConfig.Load(),
                    SysMessage   = SysMessage.Load()
                };

                ConfigData.Initialize(config);

                exists &= !string.IsNullOrEmpty(config.AppConfig.PosInfo.PosNo) &&
                          !string.IsNullOrEmpty(config.AppConfig.PosInfo.StoreNo);
            }

            if (!exists)
            {
                new MessageDialog(MessageDialogType.Warning, null, string.Empty,
                                  MSG_POS_ENV_INVALID).ShowDialog();
            }
            else
            {
                // set path to damo
                AddPathSegments(FXConsts.FOLDER_DAMO.GetLibFolder());

                // DAMO 암호화 모듈 초기설정
                DataUtils.DamoInitialize();

                // OCXRegister
                string ksNetFile = FXConsts.FOLDER_OCX.GetLibFolder() + "\\KSNet_Dongle.ocx";
                FileUtils.RegSvr32(ksNetFile);

                string keyBoardHookFile = FXConsts.FOLDER_OCX.GetLibFolder() + "\\KeyboardHook.ocx";
                FileUtils.RegSvr32(keyBoardHookFile);
            }

            return(exists);
        }
Ejemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // Create directories
            ConfigData config = new ConfigData()
            {
                AppConfig    = AppConfig.Load(),
                DevConfig    = DevConfig.Load(),
                KeyMapConfig = KeyMapConfig.Load(),
                SysMessage   = SysMessage.Load()
            };

            ConfigData.Initialize(config);

            TextBoxTraceListener listener = new TextBoxTraceListener(txtTraceLog);

            Trace.Listeners.Add(new LogFileTraceListener(LogUtils.Instance));
        }
Ejemplo n.º 4
0
        static void AppInitialize()
        {
            string keyBoardHookFile = FXConsts.FOLDER_OCX.GetLibFolder() + "\\KeyboardHook.ocx";

            FileUtils.RegSvr32(keyBoardHookFile);

            ConfigData config = new ConfigData()
            {
                AppConfig    = AppConfig.Load(),
                KeyMapConfig = KeyMapConfig.Load()
            };

            ConfigData.Initialize(config);

            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
        }
Ejemplo n.º 5
0
        void Initialize()
        {
            // Create directories
            ConfigData config = new ConfigData()
            {
                AppConfig    = AppConfig.Load(),
                DevConfig    = DevConfig.Load(),
                KeyMapConfig = KeyMapConfig.Load(),
                SysMessage   = SysMessage.Load()
            };

            ConfigData.Initialize(config);

            // refresh global config
            FrameBaseData.Current.OnDataChanged(FrameBaseDataItem.ConfigChanged, null);
            SetTopMenu("MNU_CONFIG");

            this.Shown += new EventHandler(MainForm_Shown);
        }