Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="originalSketch"></param>
        public LabelerPanel(CommandManager CM, DomainInfo domainInfo) :
            base()
        {
            lTool = new LabelerTool(CM, domainInfo, this);
            // Set the CommandManager
            this.CM = CM;

            // Set the domainInfo
            this.domainInfo = domainInfo;

            // Initialize the InkOverlay
            this.inkPic = new mInkPicture();

            this.Resize += new EventHandler(LabelerPanel_Resize);

            //oInk.SelectionChanged += new InkOverlaySelectionChangedEventHandler(oInk_SelectionChanged);

            // Hashtables so we can convert between Microsoft.Ink and our Sketch
            //this.ltool.MIdToSubstroke = new Dictionary<int,Substroke>();
            //this.substrokeIdToMStroke = new Dictionary<Guid,Microsoft.Ink.Stroke>();

            // Hashtables so we can store what fragment points are associated with FeatureStrokes
            //this.strokeToCorners = new Dictionary<Sketch.Stroke, List<int>>();

            //this.thickenedStrokes = new List<Substroke>();

            // Initialize the drawing attributes for thickened labels
            //InitThickenedLabelAttributes(120);

            // Label button & menu
            //InitializeLabelMenu();

            // Resize the panel
            InkResize();

            // Initialize the drawing attributes for fragment points
            InitFragPtAttributes(Color.Red, 25);
        }
Пример #2
0
        public LabelMenu(LabelerTool labelerPanel, CommandManager CM)
        {
            InitializeComponent();

            // Our Parent, the LabelerPanel containing this
            this.labelerPanel = labelerPanel;

            // CommandManager
            this.CM = CM;

            this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.Height      = 100;
            this.Width       = 100;

            this.previousLabel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.labelList.Dock     = System.Windows.Forms.DockStyle.Bottom;

            this.previousLabel.Size = new System.Drawing.Size(100, PREVLABELHEIGHT);
            this.labelList.Size     = new System.Drawing.Size(100, this.Height - PREVLABELHEIGHT);

            this.Location = new System.Drawing.Point(20, 20);

            // Event handlers
            this.previousLabel.MouseUp    += new System.Windows.Forms.MouseEventHandler(previousLabel_MouseUp);
            this.previousLabel.MouseEnter += new EventHandler(previousLabel_MouseEnter);
            this.previousLabel.MouseLeave += new EventHandler(previousLabel_MouseLeave);
            this.previousLabel.DragLeave  += new EventHandler(previousLabel_DragLeave);

            this.labelList.MouseUp    += new System.Windows.Forms.MouseEventHandler(labelList_MouseUp);
            this.labelList.MouseEnter += new EventHandler(labelList_MouseEnter);

            // Add the controls
            this.Controls.Add(this.labelList);
            this.Controls.Add(this.previousLabel);

            // Initially hide the panel
            this.Hide();
        }