示例#1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            mWinController = new WindowController(this);
            mWinController.DisableFocus(); //When window loses focus, prevent windows from getting focus back automaticly when clicking anything

            //Check which keyboard profile to load in.
            string[] args       = Environment.GetCommandLineArgs();
            string   layoutName = (args.Length > 1) ? layoutName = args[1] : "Keyboard";
            Point?   location   = null;
            string   point      = (args.Length > 2) ? point = args[2] : "";

            if (!string.IsNullOrEmpty(point))
            {
                string[] points = point.Split(',');
                location = new Point(int.Parse(points[0]), int.Parse(points[1]));
            }

            if (!vLayout.Load(layoutName, mainContainer, this, location))
            {
                MessageBox.Show("Error loading layout:" + layoutName);
                this.Close();
                return;
            }//if

            CreateContextMenu();
            //LoadLayoutList();

            this.MouseLeftButtonDown += MainWindow_LeftButtonDown;
        }//func
示例#2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            mWinController = new WindowController(this);
            mWinController.DisableFocus();     //When window loses focus, prevent windows from getting focus back automaticly when clicking anything

            //Check which keyboard profile to load in.
            string[] args       = Environment.GetCommandLineArgs();
            string   layoutName = (args.Length > 1) ? layoutName = args[1] : "Default";

            if (!vLayout.Load(layoutName, mainContainer, this))
            {
                MessageBox.Show("Error loading layout:" + layoutName);
                this.Close();
                return;
            }    //if

            CreateContextMenu();
            LoadLayoutList();

            this.MouseLeftButtonDown += MainWindow_LeftButtonDown;
        }    //func
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            mWinController = new WindowController(this);
                mWinController.DisableFocus(); //When window loses focus, prevent windows from getting focus back automaticly when clicking anything

                //Check which keyboard profile to load in.
                string[] args = Environment.GetCommandLineArgs();
                string layoutName = (args.Length > 1) ? layoutName = args[1] : "Default";

                if(!vLayout.Load(layoutName, mainContainer, this)){
                    MessageBox.Show("Error loading layout:" + layoutName);
                    this.Close();
                    return;
                }//if

                CreateContextMenu();
                LoadLayoutList();

                this.MouseLeftButtonDown += MainWindow_LeftButtonDown;
        }