Exemplo n.º 1
0
        protected void v_GetBottomListCompleted(object sender, WCFSV.GetBottomListCompletedEventArgs ee)
        {
            try
            {
                listButtom.Clear();
                CBottom.Children.Clear();

                var list = ee.Result;
                foreach (WCFSV.QhandyOR obj in list)
                {
                    ButtomControl mbc = new ButtomControl();
                    mbc.OpType = 1;
                    mbc.ID = Guid.NewGuid().ToString();
                    WCFSV.QhandyOR mButtom = new WCFSV.QhandyOR();
                    mButtom = _ButtomControl.Init(mButtom, this._WDBH);
                    mbc.ButtomOR = obj;
                    listButtom.Add(mbc);

                    _ButtomControl.AddAButtom(mbc);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 2
0
        public ButtomControl InitAddPosition(Point position, string _wdbh)
        {
            ButtomControl mbc = new ButtomControl();
            mbc.OpType = 0;
            mbc.ID = Guid.NewGuid().ToString();
            WCFSV.QhandyOR mButtom = new WCFSV.QhandyOR();

            mButtom = Init(mButtom, _wdbh);// Init(mButtom);
            mButtom.Orgbh = _wdbh;
            mbc.ButtomOR = mButtom;

            mbc.ButtomOR.LabelLeft = Convert.ToInt16(position.X);
            mbc.ButtomOR.LabelTop = Convert.ToInt16(position.Y);

            mbc.ButtomOR.EnlabelLeftoffset = Convert.ToInt16(position.X);
            mbc.ButtomOR.EnlabelTopoffset = Convert.ToInt16(position.Y + lableHeight * 0.7);

            mbc.ButtomOR.TagLeftoffset = Convert.ToInt16(position.X + TagWidth * 0.7);
            mbc.ButtomOR.TagTopoffset = Convert.ToInt16(position.Y);

            AddAButtom(mbc);
            return mbc;
        }