Exemplo n.º 1
0
 internal void AddTool(BlockSpace blockSpace, ToolPrototype spec)
 {
     AddNewTool(blockSpace, spec);
     LayoutTools(currentCategory);
     if (currentCategory == spec.category)
     {
         UpdateBitmap(currentCategory, tabWidth, tabHeight);
     }
 }
Exemplo n.º 2
0
        ToolPrototype tool(string tool, string category, params IBlock[] defaultArgs)
        {
            ToolPrototype tp = new ToolPrototype();

            tp.tool        = tool;
            tp.category    = category;
            tp.defaultArgs = defaultArgs;
            return(tp);
        }
Exemplo n.º 3
0
        private void AddNewTool(BlockSpace blockSpace, ToolPrototype spec)
        {
            string[] parts = spec.tool.Split("|".ToCharArray());
            //string fileName = Path.Combine(filePrefix, parts[0]) + ".bmp";
            string funcName = parts[1];
            // Bitmap tbBmp = (Bitmap)Bitmap.FromFile(fileName);
            Bitmap tbBmp = dummyFactory.ViewFromBlock(blockSpace.makeNewBlock(funcName, spec.defaultArgs))
                           .Assemble();

            //tbBmp.MakeTransparent(tbBmp.GetPixel(0, 0));
            tools.Add(new ToolSpec(tbBmp, funcName, spec.category, spec.defaultArgs));
            categories.Add(spec.category);
        }
Exemplo n.º 4
0
 ToolPrototype tool(string tool, string category, params IBlock[] defaultArgs)
 {
     ToolPrototype tp = new ToolPrototype();
     tp.tool = tool;
     tp.category = category;
     tp.defaultArgs = defaultArgs;
     return tp;
 }
Exemplo n.º 5
0
 private void AddNewTool(BlockSpace blockSpace, ToolPrototype spec)
 {
     string[] parts = spec.tool.Split("|".ToCharArray());
     //string fileName = Path.Combine(filePrefix, parts[0]) + ".bmp";
     string funcName = parts[1];
     // Bitmap tbBmp = (Bitmap)Bitmap.FromFile(fileName);
     Bitmap tbBmp = dummyFactory.ViewFromBlock(blockSpace.makeNewBlock(funcName, spec.defaultArgs))
         .Assemble();
     //tbBmp.MakeTransparent(tbBmp.GetPixel(0, 0));
     tools.Add(new ToolSpec(tbBmp, funcName, spec.category, spec.defaultArgs));
     categories.Add(spec.category);
 }
Exemplo n.º 6
0
 internal void AddTool(BlockSpace blockSpace, ToolPrototype spec)
 {
     AddNewTool(blockSpace, spec);
     LayoutTools(currentCategory);
     if (currentCategory == spec.category)
         UpdateBitmap(currentCategory, tabWidth, tabHeight);
 }