public AddFieldsPopUpViewModel(AddMessageActivityViewModel addMessageActivityViewModel, bool isModified)
        {
            this.isModified = isModified;
            lSizes          = new ObservableCollection <int>();
            for (int i = 0; i < 33; i++)
            {
                lSizes.Add(i);
            }

            this.addMessageActivityViewModel = addMessageActivityViewModel;

            if (addMessageActivityViewModel.FieldsTemp.Count == 15)
            {
                SelectSize1  = addMessageActivityViewModel.FieldsTemp[0].Bytes;
                SelectSize2  = addMessageActivityViewModel.FieldsTemp[1].Bytes;
                SelectSize3  = addMessageActivityViewModel.FieldsTemp[2].Bytes;
                SelectSize4  = addMessageActivityViewModel.FieldsTemp[3].Bytes;
                SelectSize5  = addMessageActivityViewModel.FieldsTemp[4].Bytes;
                SelectSize6  = addMessageActivityViewModel.FieldsTemp[5].Bytes;
                SelectSize7  = addMessageActivityViewModel.FieldsTemp[6].Bytes;
                SelectSize8  = addMessageActivityViewModel.FieldsTemp[7].Bytes;
                SelectSize9  = addMessageActivityViewModel.FieldsTemp[8].Bytes;
                SelectSize10 = addMessageActivityViewModel.FieldsTemp[9].Bytes;
                SelectSize11 = addMessageActivityViewModel.FieldsTemp[10].Bytes;
                SelectSize12 = addMessageActivityViewModel.FieldsTemp[11].Bytes;
                SelectSize13 = addMessageActivityViewModel.FieldsTemp[12].Bytes;
                SelectSize14 = addMessageActivityViewModel.FieldsTemp[13].Bytes;
                SelectSize15 = addMessageActivityViewModel.FieldsTemp[14].Bytes;

                Field1  = addMessageActivityViewModel.FieldsTemp[0].Description;
                Field2  = addMessageActivityViewModel.FieldsTemp[1].Description;
                Field3  = addMessageActivityViewModel.FieldsTemp[2].Description;
                Field4  = addMessageActivityViewModel.FieldsTemp[3].Description;
                Field5  = addMessageActivityViewModel.FieldsTemp[4].Description;
                Field6  = addMessageActivityViewModel.FieldsTemp[5].Description;
                Field7  = addMessageActivityViewModel.FieldsTemp[6].Description;
                Field8  = addMessageActivityViewModel.FieldsTemp[7].Description;
                Field9  = addMessageActivityViewModel.FieldsTemp[8].Description;
                Field10 = addMessageActivityViewModel.FieldsTemp[9].Description;
                Field11 = addMessageActivityViewModel.FieldsTemp[10].Description;
                Field12 = addMessageActivityViewModel.FieldsTemp[11].Description;
                Field13 = addMessageActivityViewModel.FieldsTemp[12].Description;
                Field14 = addMessageActivityViewModel.FieldsTemp[13].Description;
                Field15 = addMessageActivityViewModel.FieldsTemp[14].Description;
            }
        }
Exemple #2
0
        public AddFieldsPopUpViewModel(AddMessageActivityViewModel addMessageActivityViewModel, bool isModified)
        {
            IsModified = isModified;
            lSizes     = new ObservableCollection <int>();
            for (int i = 0; i < 5; i++)
            {
                lSizes.Add(i);
            }

            lFormats = new ObservableCollection <string>
            {
                "S/F",
                "ms",
            };

            this.AddMessageActivityViewModel = addMessageActivityViewModel;

            if (addMessageActivityViewModel.FieldsTemp.Count == 15)
            {
                SelectSize1  = addMessageActivityViewModel.FieldsTemp[0].Bytes;
                SelectSize2  = addMessageActivityViewModel.FieldsTemp[1].Bytes;
                SelectSize3  = addMessageActivityViewModel.FieldsTemp[2].Bytes;
                SelectSize4  = addMessageActivityViewModel.FieldsTemp[3].Bytes;
                SelectSize5  = addMessageActivityViewModel.FieldsTemp[4].Bytes;
                SelectSize6  = addMessageActivityViewModel.FieldsTemp[5].Bytes;
                SelectSize7  = addMessageActivityViewModel.FieldsTemp[6].Bytes;
                SelectSize8  = addMessageActivityViewModel.FieldsTemp[7].Bytes;
                SelectSize9  = addMessageActivityViewModel.FieldsTemp[8].Bytes;
                SelectSize10 = addMessageActivityViewModel.FieldsTemp[9].Bytes;
                SelectSize11 = addMessageActivityViewModel.FieldsTemp[10].Bytes;
                SelectSize12 = addMessageActivityViewModel.FieldsTemp[11].Bytes;
                SelectSize13 = addMessageActivityViewModel.FieldsTemp[12].Bytes;
                SelectSize14 = addMessageActivityViewModel.FieldsTemp[13].Bytes;
                SelectSize15 = addMessageActivityViewModel.FieldsTemp[14].Bytes;

                Field1  = addMessageActivityViewModel.FieldsTemp[0].Description;
                Field2  = addMessageActivityViewModel.FieldsTemp[1].Description;
                Field3  = addMessageActivityViewModel.FieldsTemp[2].Description;
                Field4  = addMessageActivityViewModel.FieldsTemp[3].Description;
                Field5  = addMessageActivityViewModel.FieldsTemp[4].Description;
                Field6  = addMessageActivityViewModel.FieldsTemp[5].Description;
                Field7  = addMessageActivityViewModel.FieldsTemp[6].Description;
                Field8  = addMessageActivityViewModel.FieldsTemp[7].Description;
                Field9  = addMessageActivityViewModel.FieldsTemp[8].Description;
                Field10 = addMessageActivityViewModel.FieldsTemp[9].Description;
                Field11 = addMessageActivityViewModel.FieldsTemp[10].Description;
                Field12 = addMessageActivityViewModel.FieldsTemp[11].Description;
                Field13 = addMessageActivityViewModel.FieldsTemp[12].Description;
                Field14 = addMessageActivityViewModel.FieldsTemp[13].Description;
                Field15 = addMessageActivityViewModel.FieldsTemp[14].Description;

                SelectFormat1  = addMessageActivityViewModel.FieldsTemp[0].Format;
                SelectFormat2  = addMessageActivityViewModel.FieldsTemp[1].Format;
                SelectFormat3  = addMessageActivityViewModel.FieldsTemp[2].Format;
                SelectFormat4  = addMessageActivityViewModel.FieldsTemp[3].Format;
                SelectFormat5  = addMessageActivityViewModel.FieldsTemp[4].Format;
                SelectFormat6  = addMessageActivityViewModel.FieldsTemp[5].Format;
                SelectFormat7  = addMessageActivityViewModel.FieldsTemp[6].Format;
                SelectFormat8  = addMessageActivityViewModel.FieldsTemp[7].Format;
                SelectFormat9  = addMessageActivityViewModel.FieldsTemp[8].Format;
                SelectFormat10 = addMessageActivityViewModel.FieldsTemp[9].Format;
                SelectFormat11 = addMessageActivityViewModel.FieldsTemp[10].Format;
                SelectFormat12 = addMessageActivityViewModel.FieldsTemp[11].Format;
                SelectFormat13 = addMessageActivityViewModel.FieldsTemp[12].Format;
                SelectFormat14 = addMessageActivityViewModel.FieldsTemp[13].Format;
                SelectFormat15 = addMessageActivityViewModel.FieldsTemp[14].Format;
            }
        }