Пример #1
0
        }    //func

        private void LoadLayoutList()
        {
            string[] ary = vLayout.GetLayoutList();
            if (ary.Length == 0)
            {
                return;
            }

            int      i;
            MenuItem mItem;
            var      jumpList = new vJumpList()
            {
                CategoryName = "Available Layouts", AppPath = Assembly.GetEntryAssembly().Location
            };

            for (i = 0; i < ary.Length; i++)
            {
                //Add Item to context menu
                mItem = new MenuItem()
                {
                    Header = ary[i], Tag = ary[i]
                };
                mItem.Click += MenuItem_Click;
                mAppMenu.Items.Add(mItem);

                //Create JumpList Item
                jumpList.AddTask(ary[i], "Load this Keyboard Layout", ary[i]);
            }    //for

            jumpList.Apply();
        }    //for
Пример #2
0
        private void LoadLayoutList()
        {
            string[] ary = vLayout.GetLayoutList();
                if(ary.Length == 0) return;

                int i;
                MenuItem mItem;
                var jumpList = new vJumpList() { CategoryName = "Available Layouts", AppPath = Assembly.GetEntryAssembly().Location };

                for(i = 0; i < ary.Length; i++) {
                    //Add Item to context menu
                    mItem = new MenuItem() { Header = ary[i], Tag = ary[i] };
                    mItem.Click += MenuItem_Click;
                    mAppMenu.Items.Add(mItem);

                    //Create JumpList Item
                    jumpList.AddTask(ary[i], "Load this Keyboard Layout", ary[i]);
                }//for

                jumpList.Apply();
        }