コード例 #1
0
        public frmNewLockDown()
        {
            InitializeComponent();
            base.UpdateResourcesInForm("en-US");

            this.powerManager = new PowerManagement();

            base.UpdateResourcesInForm(GlobalVariable.LanguageSelect);
            FullScreenHandle.StartFullScreen(this);

            this.txtEsc.Text = string.Empty;
        }
コード例 #2
0
        private void OpenApplication(string appName)
        {
            try
            {
                string codeBase = Assembly.GetExecutingAssembly().GetName().CodeBase;
                string appPath  = Path.GetDirectoryName(codeBase).Replace("bits_lockdown", string.Empty);

                string startAppName = string.Format("{0}\\{1}", appPath, appName);

                if (File.Exists(startAppName))
                {
                    this.IsRunning = true;

                    CreateLaunchApp.LaunchApp(startAppName, string.Empty);

                    this.IsRunning = false;
                    FullScreenHandle.StartFullScreen(this);
                    this.txtEsc.Text = string.Empty;

                    Cursor.Current = Cursors.Default;
                    Cursor.Show();
                }
                else
                {
                    Cursor.Current = Cursors.Default;
                    Cursor.Show();

                    this.IsRunning = false;
                    MessageBox.Show(startAppName + "\nFile Not Exist");
                }
            }
            catch (Exception ex)
            {
                this.IsRunning = false;
                MessageBox.Show(ex.Message, "OpenApplication");
            }
        }