Example #1
0
        public static ModuleManager GetInstance()
        {
            if (instance == null)
            {
                instance = new ModuleManager();
                InitializeLoadableModules(ConfigurationManager.AppSettings["ModulesPath"]);
            }

            return instance;
        }
Example #2
0
        public Shell()
        {
            // Commented below 2 lines as Logon function has been moved to ModuleSelectionPresenter.cs
            // Modified By JK on 01/09/12
            //LogOnKioskResponse logonResponse = new LogOnKioskResponse();
            //LogonServiceClient logonproxy = null;
            bool LoadApp = true;
            //this.ScrollerText = string.Empty;
               // System.Configuration.Configuration config;

            bool showCursor = (ConfigurationManager.AppSettings["ShowCursor"] == null) ? false : Convert.ToBoolean(ConfigurationManager.AppSettings["ShowCursor"]);

            if (showCursor)
                this.Cursor = System.Windows.Input.Cursors.Arrow;
            else
                this.Cursor = System.Windows.Input.Cursors.None;

            InitializeComponent();

            //if (LoadApp)
            //{
            //    // Init cash acceptor device and printer devices.

                //DeviceAgent.GetInstance().Init();
                //string result = Logger.GetRecentScrollers();
                //if ((!string.IsNullOrEmpty(result)) &&
                //    (KioskAppConfig.Scrollers != result))
                //{
                //    KioskAppConfig.Scrollers = result;

                //}
                moduleManager = ModuleManager.GetInstance();
                currentModule = moduleManager.GetDefaultModule();
                currentModule.ModuleLayoutUpdatedEvent += OnModuleLayoutUpdated;
                currentModule.ModuleSelectionChangedEvent += OnModuleSelectionChanged;
                currentModule.Activate();
                this.BeginInit();
                try
                {
                    this.ccModule.Content = null;
                    this.ccModule.Content = currentModule.ShellGrid;

                }
                finally
                {
                    this.EndInit();
                    this.UpdateLayout();
                }
            //}
            //else
            //{
            //    if (log.IsErrorEnabled) log.ErrorFormat("Logon not Successfull");
            //    Application.Current.Shutdown(1);
            //}
        }