コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        private void PasteTagProperty()
        {
            if (mPropertyCopy != null)
            {
                foreach (var vv in SelectedCells)
                {
                    if (vv.Item == mPropertyCopy.Item1)
                    {
                        continue;
                    }
                    else
                    {
                        TagViewModel tm = vv.Item as TagViewModel;
                        switch (mPropertyCopy.Item2)
                        {
                        case 1:
                            tm.Type = mPropertyCopy.Item1.Type;
                            break;

                        case 2:
                            tm.ReadWriteMode = mPropertyCopy.Item1.ReadWriteMode;
                            break;

                        case 3:
                            tm.Convert = mPropertyCopy.Item1.Convert.Clone();
                            break;

                        case 4:
                            tm.MaxValue = mPropertyCopy.Item1.MaxValue;
                            break;

                        case 5:
                            tm.MinValue = mPropertyCopy.Item1.MinValue;
                            break;

                        case 6:
                            tm.Precision = mPropertyCopy.Item1.Precision;
                            break;

                        case 7:
                            tm.HisTagMode = mPropertyCopy.Item1.HisTagMode.Clone();
                            tm.RefreshHisTag();
                            break;

                        case 8:
                            tm.DriverName = mPropertyCopy.Item1.DriverName;
                            break;

                        case 9:
                            tm.RegistorName = mPropertyCopy.Item1.RegistorName;
                            break;

                        case 10:
                            tm.Desc = mPropertyCopy.Item1.Desc;
                            break;
                        }
                    }
                }
            }
        }