コード例 #1
0
        void setUIValueByBarCodeData(BarCodeComponent barCodeData)
        {
            BarCodeInfo   = barCodeData.BarCodeInfo;
            BarCodeWidth  = barCodeData.BarCodeWidth;
            BarCodeHeight = barCodeData.BarCodeHeight;
            BarCodeCore.EnCodeDraw drawer = new BarCodeCore.EnCodeDraw();
            barCodeGrid.Children.Clear();
            barCodeGrid.Children.Add(drawer.DrawImg39(BarCodeInfo, BarCodeWidth, BarCodeHeight));
            CenterPoint = new Point(barCodeData.PositionX, barCodeData.PositionY);
            BarCodeType type = (BarCodeType)Enum.Parse(typeof(BarCodeType), barCodeData.BarCodeType, true);
            MergePictureRepeatDirection repeatDirection = (MergePictureRepeatDirection)Enum.Parse(typeof(MergePictureRepeatDirection), barCodeData.RepeatDirection, true);

            Type            = type;
            RepeatDirection = repeatDirection;
        }
コード例 #2
0
        public BarCode(IContainer container, BarCodeType bt, string binfo, int bw, int bh)
        {
            InitializeComponent();
            _container = container;
            editType   = PageEditType.Add;
            this.Type  = bt;
            //System.Windows.Browser.HtmlPage.Document.AttachEvent("oncontextmenu", OnContextMenu);
            //this.Name = UniqueID;
            BarCodeCore.EnCodeDraw drawer = new BarCodeCore.EnCodeDraw();
            barCodeGrid.Children.Add(drawer.DrawImg39(binfo, bw, bh));

            _doubleClickTimer          = new System.Windows.Threading.DispatcherTimer();
            _doubleClickTimer.Interval = new TimeSpan(0, 0, 0, 0, 400);
            _doubleClickTimer.Tick    += new EventHandler(DoubleClick_Timer);
            Storyboard story = (Storyboard)containerUI.FindResource("sbDisplay");

            story.Begin();
        }