Beispiel #1
0
 internal void AddTool(BlockSpace blockSpace, ToolPrototype spec)
 {
     AddNewTool(blockSpace, spec);
     LayoutTools(currentCategory);
     if (currentCategory == spec.category)
     {
         UpdateBitmap(currentCategory, tabWidth, tabHeight);
     }
 }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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;
 }
Beispiel #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);
 }
Beispiel #6
0
 internal void AddTool(BlockSpace blockSpace, ToolPrototype spec)
 {
     AddNewTool(blockSpace, spec);
     LayoutTools(currentCategory);
     if (currentCategory == spec.category)
         UpdateBitmap(currentCategory, tabWidth, tabHeight);
 }