Exemple #1
0
 private void getSysCommand(BaseItem menuitem)
 {
     switch (menuitem.Name.ToLower())
     {
     case "menueditstate":
         //关闭编辑功能保存菜单
         if (((ButtonItem)menuitem).Checked)
         {
             fileName = Application.StartupPath + @"\CONFIG\Menu.config";
             ((ButtonItem)menuitem).Checked = !((ButtonItem)menuitem).Checked;
             EditorMenu();
             ToolboxBar.SaveDefinition(fileName);
             ModifyDefinition();
             AddButtonItemEvent();
         }
         //开启编辑功能改变菜单操作功能
         else
         {
             EditorMenu();
             FJMainForm.Instance.Message(menuitem, "菜单拖动功能已改为编辑菜单顺序!");
             FJMainForm.Instance.SetLog("已转换成菜单编辑功能");
             ((ButtonItem)menuitem).Checked = !((ButtonItem)menuitem).Checked;
             RemoveButtonItemEvent();
         }
         isEdit = ((ButtonItem)menuitem).Checked;
         break;
     }
 }
Exemple #2
0
        /// <summary>
        /// 初始化工具箱
        /// </summary>
        private void InitToolBox(string Type)
        {
            #region 添加ToolBox

            _type = Type;
            if (Type == "S")
            {
                //加载工具箱结构文档
                fileName = Application.StartupPath + @"\CONFIG\SMenu.config";
            }
            else
            {
                //加载工具箱结构文档
                fileName = Application.StartupPath + @"\CONFIG\BMenu.config";
            }

            //通过文件加载菜单
            ToolboxBar.LoadDefinition(fileName);
            InitButtonItemEvent();
            #endregion
        }
Exemple #3
0
        public ToolboxTester()
        {
            var toolboxBar = new ToolboxBar(0, SkiaRoot.ScreenHeight * 0.85f, SkiaRoot.ScreenHeight * 0.15f, SkiaRoot.ScreenWidth);

            AddChild(toolboxBar);
        }