public override int GetHashCode()
        {
            int hash = 1;

            if (TaskID != 0)
            {
                hash ^= TaskID.GetHashCode();
            }
            if (SeqID != 0)
            {
                hash ^= SeqID.GetHashCode();
            }
            if (MaxDoneCount != 0)
            {
                hash ^= MaxDoneCount.GetHashCode();
            }
            if (MulCondType != 0)
            {
                hash ^= MulCondType.GetHashCode();
            }
            if (TaskName.Length != 0)
            {
                hash ^= TaskName.GetHashCode();
            }
            if (TaskDesc.Length != 0)
            {
                hash ^= TaskDesc.GetHashCode();
            }
            if (FinishConditionID != 0)
            {
                hash ^= FinishConditionID.GetHashCode();
            }
            if (TargetProcess != 0)
            {
                hash ^= TargetProcess.GetHashCode();
            }
            hash ^= actMulCondTaskAward_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (TaskID != 0)
            {
                hash ^= TaskID.GetHashCode();
            }
            if (SeqID != 0)
            {
                hash ^= SeqID.GetHashCode();
            }
            if (ExchangeMaxCount != 0)
            {
                hash ^= ExchangeMaxCount.GetHashCode();
            }
            if (TaskName.Length != 0)
            {
                hash ^= TaskName.GetHashCode();
            }
            if (TaskDesc.Length != 0)
            {
                hash ^= TaskDesc.GetHashCode();
            }
            if (ExchangeTargetID != 0)
            {
                hash ^= ExchangeTargetID.GetHashCode();
            }
            if (ExchangeTargetNum != 0)
            {
                hash ^= ExchangeTargetNum.GetHashCode();
            }
            hash ^= actConsumeRes_.GetHashCode();
            if (ResetType != 0)
            {
                hash ^= ResetType.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Example #3
0
        private void btnGenID_Click(object sender, EventArgs e)
        {
            try
            {
                string[] ids = new string[10];

                for (int i = 0; i < 10; i++)
                {
                    ids[i] = SeqID.New();
                }

                //  把 产生 ID 和 WriteMsg() 分开, 是因为 WriteMsg() 是 窗口操作, 比较慢, 可能超过 1毫秒,
                //  这样就看不出来 1毫秒 内 ID 尾数序号 的 递增
                for (int i = 0; i < 10; i++)
                {
                    WriteMsg(ids[i]);
                }
            }
            catch (Exception ex)
            {
                WriteMsg(ex.ToString());
            }
        }