Esempio n. 1
0
        public void getPassword(string objectName, string passwords)
        {
            RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\WinRegistry");
            string      pwd = "";

            if (key != null && key.GetValue("POSPassword") != null)
            {
                pwd = key.GetValue("POSPassword").ToString();
            }
            else if (key == null)
            {
                pwd = "";
            }
            if (pwd == passwords)
            {
                switch (objectName)
                {
                case "maintenance":
                    FormPanel.Controls.Clear();
                    MaintaneceMenu maintaneceMenu = new MaintaneceMenu(mainFomeGlobal, FormPanel);
                    maintaneceMenu.TopLevel = false;
                    FormPanel.Controls.Add(maintaneceMenu);
                    maintaneceMenu.FormBorderStyle = FormBorderStyle.None;
                    maintaneceMenu.Dock            = DockStyle.Fill;
                    Thread.Sleep(200);
                    maintaneceMenu.Show();
                    break;

                case "readingmenu":
                    FormPanel.Controls.Clear();
                    MenuReading menuReading = new MenuReading(mainFomeGlobal, FormPanel);
                    menuReading.TopLevel = false;
                    FormPanel.Controls.Add(menuReading);
                    menuReading.FormBorderStyle = FormBorderStyle.None;
                    menuReading.Dock            = DockStyle.Fill;
                    Thread.Sleep(200);
                    menuReading.Show();
                    break;
                }
            }
        }
Esempio n. 2
0
 public void initMenuReading(MenuReading sendHandler)
 {
     menuReading = sendHandler;
 }