private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            this.viewModel_ = this.DataContext as Excel_averageUnderlyingCalcIDViewModel;

            this.underlyingSelectListView_.ItemsSource = this.viewModel_.Excel_selectedUnderlyingViewModel_;

        }
コード例 #2
0
        public override Excel_underlyingCalcIDViewModel Clone()
        {
            Excel_averageUnderlyingCalcIDViewModel clone = new Excel_averageUnderlyingCalcIDViewModel();

            foreach (var item in this.excel_selectedUnderlyingViewModel_)
            {
                clone.excel_selectedUnderlyingViewModel_ = new ObservableCollection <Excel_selectedUnderlyingViewModel>();
                clone.excel_selectedUnderlyingViewModel_.Add(item.Clone());
            }

            clone.EventDate_ = this.eventDate_;
            clone.Weight_    = this.weight_;

            return(clone);
        }
        public static Excel_underlyingCalcIDViewModel CreateExcel_underlyingCalcID(Excel_stepDownKI_subScheduleViewModel e_s_svm)
        {
            string typeStr = e_s_svm.UnderCalcType_;

            if (typeStr.ToUpper() == "MAXIMUM" || typeStr.ToUpper() == "MAX")
            {
                Excel_maximumUnderlyingCalcIDViewModel e_mucidvm = new Excel_maximumUnderlyingCalcIDViewModel();

                e_mucidvm.EventDate_   = e_s_svm.EventDate_;
                e_mucidvm.AverageDays_ = e_s_svm.AverageDays_;

                return(e_mucidvm);
            }
            else if (typeStr.ToUpper() == "MINIMUM" || typeStr.ToUpper() == "MIN")
            {
                Excel_minimumUnderlyingCalcIDViewModel e_mucidvm = new Excel_minimumUnderlyingCalcIDViewModel();

                e_mucidvm.EventDate_   = e_s_svm.EventDate_;
                e_mucidvm.AverageDays_ = e_s_svm.AverageDays_;

                return(e_mucidvm);
            }
            else if (typeStr.ToUpper() == "AVERAGE" || typeStr.ToUpper() == "AVER")
            {
                Excel_averageUnderlyingCalcIDViewModel e_mucidvm = new Excel_averageUnderlyingCalcIDViewModel();

                e_mucidvm.EventDate_ = e_s_svm.EventDate_;
                //e_mucidvm.AverageDays_ = e_s_svm.AverageDays_;

                return(e_mucidvm);
            }
            //else if (typeStr == "excel_orderUnderlyingCalcID")
            //{
            //    return new Excel_orderUnderlyingCalcIDViewModel();
            //}
            else
            {
                throw new NotImplementedException();
            }
        }
        public override Excel_underlyingCalcIDViewModel Clone()
        {
            Excel_averageUnderlyingCalcIDViewModel clone = new Excel_averageUnderlyingCalcIDViewModel();

            foreach (var item in this.excel_selectedUnderlyingViewModel_)
            {
                clone.excel_selectedUnderlyingViewModel_ = new ObservableCollection<Excel_selectedUnderlyingViewModel>();
                clone.excel_selectedUnderlyingViewModel_.Add(item.Clone());
            }

            clone.EventDate_ = this.eventDate_;
            clone.Weight_ = this.weight_;

            return clone;
        }
        private void ViewModelChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            this.viewModel_ = this.DataContext as Excel_averageUnderlyingCalcIDViewModel;

            this.underlyingSelectListView_.ItemsSource = this.viewModel_.Excel_selectedUnderlyingViewModel_;
        }
        public static Excel_underlyingCalcIDViewModel CreateExcel_underlyingCalcID(Excel_stepDownKI_subScheduleViewModel e_s_svm)
        {
            string typeStr = e_s_svm.UnderCalcType_;

            if (typeStr.ToUpper() == "MAXIMUM" || typeStr.ToUpper() == "MAX")
            {
                Excel_maximumUnderlyingCalcIDViewModel e_mucidvm = new Excel_maximumUnderlyingCalcIDViewModel();

                e_mucidvm.EventDate_ = e_s_svm.EventDate_;
                e_mucidvm.AverageDays_ = e_s_svm.AverageDays_;

                return e_mucidvm;
            }
            else if (typeStr.ToUpper() == "MINIMUM" || typeStr.ToUpper() == "MIN")
            {
                Excel_minimumUnderlyingCalcIDViewModel e_mucidvm = new Excel_minimumUnderlyingCalcIDViewModel();

                e_mucidvm.EventDate_ = e_s_svm.EventDate_;
                e_mucidvm.AverageDays_ = e_s_svm.AverageDays_;

                return e_mucidvm;

            }
            else if (typeStr.ToUpper() == "AVERAGE" || typeStr.ToUpper() == "AVER")
            {
                Excel_averageUnderlyingCalcIDViewModel e_mucidvm = new Excel_averageUnderlyingCalcIDViewModel();

                e_mucidvm.EventDate_ = e_s_svm.EventDate_;
                //e_mucidvm.AverageDays_ = e_s_svm.AverageDays_;

                return e_mucidvm;
            }
            //else if (typeStr == "excel_orderUnderlyingCalcID")
            //{
            //    return new Excel_orderUnderlyingCalcIDViewModel();
            //}
            else
            {
                throw new NotImplementedException();
            }
        }