コード例 #1
0
ファイル: FreeHandTool.cs プロジェクト: weimingtom/nshape
        private void Construct(Project project)
        {
            if (project == null)
            {
                throw new ArgumentNullException("project");
            }

            Title       = "Freehand Pen";
            ToolTipText = "Draw the symbol of the object which should be created.";

            SmallIcon = global::Dataweb.NShape.Properties.Resources.FreehandIconSmall;
            SmallIcon.MakeTransparent(Color.Fuchsia);
            LargeIcon = global::Dataweb.NShape.Properties.Resources.FreehandIconLarge;
            LargeIcon.MakeTransparent(Color.Fuchsia);

            polygone      = new PathFigureShape();
            strokeSet     = new StrokeSequence();
            currentStroke = new Stroke();
            shaper        = new Shaper();

            timer          = new Timer();
            timer.Enabled  = false;
            timer.Interval = timeOut;
            timer.Elapsed += timer_Tick;

            this.project           = project;
            project.LibraryLoaded += project_LibraryLoaded;
            RegisterFigures();
        }
コード例 #2
0
        private void Construct(Project project)
        {
            if (project == null) throw new ArgumentNullException("project");

            Title = "Freehand Pen";
            ToolTipText = "Draw the symbol of the object which should be created.";

            SmallIcon = global::Dataweb.NShape.Properties.Resources.FreehandIconSmall;
            SmallIcon.MakeTransparent(Color.Fuchsia);
            LargeIcon = global::Dataweb.NShape.Properties.Resources.FreehandIconLarge;
            LargeIcon.MakeTransparent(Color.Fuchsia);

            polygone = new PathFigureShape();
            strokeSet = new StrokeSequence();
            currentStroke = new Stroke();
            shaper = new Shaper();

            timer = new Timer();
            timer.Enabled = false;
            timer.Interval = timeOut;
            timer.Elapsed += timer_Tick;

            this.project = project;
            project.LibraryLoaded += project_LibraryLoaded;
            RegisterFigures();
        }