Пример #1
0
        protected override void OnBeforePopUp(object sender, EventArgs e)
        {
            if (m_ChoiceControl == null)
            {
                m_ChoiceControl = GetChoiceControl();
                m_ChoiceControl.ApplySelection      += new EventHandler(m_ChoiceControl_ApplySelection);
                m_ChoiceControl.SelectedItemChanged += new EventHandler <ItemEventArgs>(m_ChoiceControl_SelectedItemChanged);
                m_ChoiceControl.Margin = new Thickness(5);

                ContentControl = m_ChoiceControl;
                PopUpContainer.PopupControl.Caption = Localization.MeasureChoice_Caption + "...";
            }

            UpdateButtonsState();

            BeforePopUp();

            if (NeedReload)
            {
                m_ChoiceControl.URL              = URL;
                m_ChoiceControl.Connection       = m_AConnection;
                m_ChoiceControl.CubeName         = m_ACubeName;
                m_ChoiceControl.MeasureGroupName = m_AMeasureGroupName;

                m_ChoiceControl.Initialize();
                NeedReload = false;
            }
        }
        protected override void OnBeforePopUp(object sender, EventArgs e)
        {
            if (m_ChoiceControl == null)
            {
                m_ChoiceControl = GetChoiceControl();
                m_ChoiceControl.ApplySelection += new EventHandler(m_ChoiceControl_ApplySelection);
                m_ChoiceControl.SelectedItemChanged += new EventHandler<ItemEventArgs>(m_ChoiceControl_SelectedItemChanged);
                m_ChoiceControl.Margin = new Thickness(5);

                ContentControl = m_ChoiceControl;
                PopUpContainer.PopupControl.Caption = Localization.MeasureChoice_Caption + "...";
            }

            UpdateButtonsState();

            BeforePopUp();

            if (NeedReload)
            {
                m_ChoiceControl.URL = URL;
                m_ChoiceControl.Connection = m_AConnection;
                m_ChoiceControl.CubeName = m_ACubeName;
                m_ChoiceControl.MeasureGroupName = m_AMeasureGroupName;

                m_ChoiceControl.Initialize();
                NeedReload = false;
            }
        }