예제 #1
0
        public async Task LoadIndicators()
        {
            if (IsEditMode)
            {
                return;
            }

            try
            {
                List <Indicator> list = await NAV.GetIndicatorsByLocation(Code, ACD.Default).ConfigureAwait(true);

                if (NotDisposed)
                {
                    ObservableCollection <IndicatorViewModel> nlist = new ObservableCollection <IndicatorViewModel>();
                    foreach (Indicator indicator in list)
                    {
                        IndicatorViewModel ivm = new IndicatorViewModel(Navigation, indicator);
                        nlist.Add(ivm);
                    }
                    Indicators = nlist;
                }
            }
            catch (OperationCanceledException e)
            {
                System.Diagnostics.Debug.WriteLine(e.Message);
                ErrorText = e.Message;
            }
        }