Example #1
0
        public ClipActionRecord(SwfReader r, bool isSwf6Plus)
        {
            uint highClip = r.GetBits(16) << 16;
            uint lowClip = 0;
            bool isEndRecord = false;
            if (highClip == 0)
            {
                if (isSwf6Plus)
                {
                    lowClip = r.GetBits(16);
                    if (lowClip == 0)
                    {
                        ClipEvents = (ClipEvents)0;
                        ActionRecordSize = 4;
                        isEndRecord = true;
                    }
                }
                else
                {
                    ClipEvents = (ClipEvents)0;
                    ActionRecordSize = 2;
                    isEndRecord = true;
                }
            }
            else
            {
                lowClip = r.GetBits(16);
            }

            if (!isEndRecord)
            {
                ClipEvents = (ClipEvents)(lowClip | highClip);
                ActionRecordSize = r.GetUI32();
                if ((ClipEvents & ClipEvents.KeyPress) > 0)
                {
                    KeyCode = r.GetByte();
                }
                ActionRecords = new ActionRecords(r, ActionRecordSize); // always is init tag?
            }
        }
Example #2
0
        public ButtonCondAction(SwfReader r)
        {
            CondActionSize = r.GetUI16();
            CondIdleToOverDown = r.GetBit();
            CondOutDownToIdle = r.GetBit();
            CondOutDownToOverDown = r.GetBit();
            CondOverDownToOutDown = r.GetBit();
            CondOverDownToOverUp = r.GetBit();
            CondOverUpToOverDown = r.GetBit();
            CondOverUpToIdle = r.GetBit();
            CondIdleToOverUp = r.GetBit();
            CondKeyPress = r.GetBits(7);
            CondOverDownToIdle = r.GetBit();

            uint start = r.Position;
            ActionRecords = new ActionRecords(r, int.MaxValue);
            ActionRecords.CodeSize = r.Position - start;
        }
Example #3
0
 public DoActionTag(SwfReader r, uint tagLen, bool isInitTag)
 {
     this.isInitTag = isInitTag;
     ActionRecords = new ActionRecords(r, tagLen, isInitTag);
 }
Example #4
0
 public DoActionTag()
 {
     ActionRecords = new ActionRecords();
 }
Example #5
0
        /// <summary>
        /// 提交修改
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// TODO:处理需要修改团号的逻辑
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            //检查团号为空?
            if (string.IsNullOrEmpty(txtGroupNo.Text))
            {
                MessageBoxEx.Show("团号不能为空!");
                return;
            }
            DialogResult res = MessageBoxEx.Show("是否提交修改?", "确认", MessageBoxButtons.OKCancel);

            if (res == DialogResult.Cancel)
            {
                return;
            }
            if (!_initFromVisaModel) //从List列表初始化
            {
                //1.保存团号信息修改到数据库,Visa表(sales_person,country,GroupNo,PredictTime)
                if (_visaModel != null)
                {
                    MessageBoxEx.Show("内部错误!");
                    return;
                }
                if (!CtrlsToVisaModel())
                {
                    return;
                }

                if ((_visaModel.Visa_id = _bllVisa.Add(_visaModel)) == Guid.Empty) //执行更新,返回值是新插入的visamodel的guid
                {
                    MessageBoxEx.Show("添加团号到数据库失败,请重试!");
                    return;
                }

                //2.更新model,设置资料已录入,团号,国家等
                _dgvList = (List <Model.VisaInfo>)dgvGroupInfo.DataSource;
                //2.1更新VisaInfo数据库
                UpdateInListVisaInfo(_dgvList);
                bool hasTypedIn = _bllLoger.HasVisaBeenTypedIn(_visaModel);
                //3.1更新这些人的录入情况到ActionResult里面
                for (int i = 0; i < _dgvList.Count; i++)
                {
                    Model.ActionRecords log = new ActionRecords();
                    if (!hasTypedIn) //第一次打开进行设置团号,就是录入,这里的判断其实是多余的。。。因为这里进来就一定是还没做团号的....
                    {
                        log.ActType = Common.Enums.ActType._01TypeIn;
                    }
                    else //第二次是做资料
                    {
                        log.ActType = Common.Enums.ActType._02TypeInData;
                    }
                    log.WorkId      = Common.GlobalUtils.LoginUser.WorkId;
                    log.UserName    = Common.GlobalUtils.LoginUser.UserName;
                    log.VisaInfo_id = _dgvList[i].VisaInfo_id;
                    log.Visa_id     = _visaModel.Visa_id;
                    log.Type        = Common.Enums.Types.Individual;
                    log.EntryTime   = DateTime.Now;
                    _bllLoger.Add(log);
                }

                //添加完成后,删除这几个人
                for (int i = 0; i < lvIn.Items.Count; i++)
                {
                    _list.Remove((Model.VisaInfo)lvIn.Items[i].Tag);
                }
                lvIn.Items.Clear();
                _visaModel = null;
                UpdateDgvAndListViaListView();
                if (_list.Count == 0)
                {
                    _updateDel(_curPage);
                    Close();
                }
            }
            else
            {
                //从model初始化的,只考虑信息的修改以及移出人

                //如果所有人都移出了,提示请点击删除
                if (lvIn.Items.Count == 0)
                {
                    MessageBoxEx.Show("若需要将全部成员移出此团号,请点击\"删除团号\"按钮");
                    return;
                }

                //1.保存团号信息修改到数据库,Visa表(sales_person,country,GroupNo,PredictTime)
                if (!CtrlsToVisaModel(_visaModel))
                {
                    return;
                }

                if (!_bllVisa.Update(_visaModel)) //执行更新
                {
                    MessageBoxEx.Show("更新团号信息失败!");
                    return;
                }
                //2.更新model,设置资料已录入,团号,国家等
                _dgvList = (List <Model.VisaInfo>)dgvGroupInfo.DataSource;
                //2.1更新还留在团内的人的VisaInfo数据库
                UpdateInListVisaInfo(_dgvList);
                //添加记录
                bool hasTypedIn = _bllLoger.HasVisaBeenTypedIn(_visaModel);
                for (int i = 0; i < _dgvList.Count; i++)
                {
                    Model.ActionRecords log = new ActionRecords();
                    if (!hasTypedIn)
                    {
                        log.ActType = Common.Enums.ActType._01TypeIn;
                    }
                    else //第二次是做资料
                    {
                        log.ActType = Common.Enums.ActType._02TypeInData;
                    }
                    log.WorkId      = Common.GlobalUtils.LoginUser.WorkId;
                    log.UserName    = Common.GlobalUtils.LoginUser.UserName;
                    log.VisaInfo_id = _dgvList[i].VisaInfo_id;
                    log.Visa_id     = _visaModel.Visa_id;
                    log.Type        = Common.Enums.Types.Individual;
                    log.EntryTime   = DateTime.Now;
                    _bllLoger.Add(log);
                }

                //2.2更新移出的人的数据库
                UpdateOutListVisaInfo();
                _updateDel(_curPage);
                Close();
            }


            //
            //Close();
        }