コード例 #1
0
        private void CreateFireShapes(byte[] theData)
        {
            byte[] part = new byte[singleToolSize];
            myTools = new List <SingleTool>();
            int i = 0;

            while (true)
            {
                try
                {
                    Array.Copy(theData, i * singleToolSize, part, 0, singleToolSize);
                    object ob = (object)part;

                    SingleTool tool = new SingleTool();
                    tool.InitTool(part);
                    myTools.Add(tool);

                    i++;

                    //if (i >= 13) break;
                }
                catch (Exception e)
                {
                    System.Console.WriteLine("Exception " + e.Message + " " + i);
                    break;
                }
            }

            System.Console.WriteLine("Total=" + i);
        }
コード例 #2
0
        public void Update(SingleTool from)
        {
            this.StrokeNum = from.StrokeNum;
            this.CompId    = from.CompId;
            this.CompName  = from.CompName;
            this.width     = from.width;
            this.height    = from.height;

            Array.Copy(from.compData, this.compData, 30);
        }
コード例 #3
0
        protected void RedrawTool(Graphics g, SingleTool data, int index)
        {
            int X;
            int Y;

            X = index % 2;
            Y = index / 2;

            Y = Y * 75 + 10;
            X = X * 75 + 10;

            Rectangle rect = new Rectangle();

            rect.X      = X; // +32;
            rect.Y      = Y; // +32;
            rect.Width  = toolWidth;
            rect.Height = toolHeight;

            LeRect myRect = new LeRect(rect);

            data.Rect = new LeRect(rect);
            DrawButton(g, X, Y, toolWidth, toolHeight, data.Selected);
            data.Draw(g);
        }