void MembersArea_PerformControlAction(object sender, ControlActionEventArgs<MemberControl> e)
		{
			ModalDialog dlg;
			MemberInfo info = e.UserData != null ? e.UserData.Member : null;
			switch (e.Action)
			{
				case ControlActionType.ShowMDX:
					ShowDataSourceInfo(GetDataSourceInfo(null));
					break;
				case ControlActionType.ShowProperties:
					dlg = new ModalDialog() { Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
					MemberPropertiesControl properties = new MemberPropertiesControl();
					properties.Initialize(info);
					dlg.Content = properties;
					dlg.Caption = Localization.MemberPropertiesDialog_Caption;
					Panel panel = GetRootPanel(this);
					if (panel != null)
					{
						panel.Children.Add(dlg.Dialog.PopUpControl);
					}
					ShowDialog(dlg);
					break;
				case ControlActionType.ShowAttributes:
					ShowMemberAttributes(info);
					break;
				case ControlActionType.SortingByProperty:
					ShowSortPropertiesDialog(PivotTableSortTypes.SortByProperty, e.UserData);
					break;
				case ControlActionType.SortingAxisByMeasure:
					ShowSortPropertiesDialog(PivotTableSortTypes.SortAxisByMeasure, e.UserData);
					break;
				case ControlActionType.SortingByValue:
					ShowSortPropertiesDialog(PivotTableSortTypes.SortByValue, e.UserData);
					break;
				case ControlActionType.ClearAxisSorting:
					if (m_CellSetProvider != null)
					{
						if (e.UserData is ColumnMemberControl)
						{
							if (PivotGrid.AxisIsRotated == false)
								m_CellSetProvider.ClearSort(0);
							else
								m_CellSetProvider.ClearSort(1);
						}
						if (e.UserData is RowMemberControl)
						{
							if (PivotGrid.AxisIsRotated == false)
								m_CellSetProvider.ClearSort(1);
							else
								m_CellSetProvider.ClearSort(0);
						}
					}
					bool refreshed = false;
					if (DataManager != null)
					{
						if (DataManager.Axis0_MeasuresSort != null || DataManager.Axis1_MeasuresSort != null)
						{
							SetAxisByMeasureSort(e.UserData, null);
							refreshed = true;
							RunServiceCommand(ServiceCommandType.Refresh);
						}
					}

					if (!refreshed)
					{
						try
						{
							IsWaiting = true;
							PivotGrid.Initialize(m_CellSetProvider);
						}
						finally
						{
							IsWaiting = false;
						}
					}
					break;
				case ControlActionType.DataReorganizationType_None:
					ChangeDataReorganizationType(DataReorganizationTypes.None);
					break;
				case ControlActionType.DataReorganizationType_HitchToParent:
					ChangeDataReorganizationType(DataReorganizationTypes.LinkToParent);
					break;
				case ControlActionType.DataReorganizationType_MergeNeighbors:
					ChangeDataReorganizationType(DataReorganizationTypes.MergeNeighbors);
					break;
			}
		}
 void ShowMemberAttributes(MemberData member)
 {
     if (member != null)
     {
         ModalDialog dlg = new ModalDialog() { Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
         MemberPropertiesControl properties = new MemberPropertiesControl();
         properties.Initialize(member);
         dlg.Content = properties;
         dlg.Caption = Localization.CustomPropertiesDialog_Caption;
         Panel panel = GetRootPanel(this);
         if (panel != null)
         {
             panel.Children.Add(dlg.Dialog.PopUpControl);
         }
         // На время убираем контекстное меню сводной таблицы
         dlg.DialogClosed += new EventHandler<DialogResultArgs>(Dlg_DialogClosed);
         PivotGrid.UseContextMenu = false;
         dlg.Show();
     }
 }
		void ShowMemberAttributes(MemberData member)
		{
			if (member != null)
			{
				ModalDialog dlg = new ModalDialog() { Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
				MemberPropertiesControl properties = new MemberPropertiesControl();
				properties.Initialize(member);
				dlg.Content = properties;
				dlg.Caption = Localization.CustomPropertiesDialog_Caption;
				Panel panel = GetRootPanel(this);
				if (panel != null)
				{
					panel.Children.Add(dlg.Dialog.PopUpControl);
				}
				ShowDialog(dlg);
			}
		}
 void MembersArea_PerformControlAction(object sender, ControlActionEventArgs<MemberInfo> e)
 {
     switch (e.Action)
     {
         case ControlActionType.ShowMDX:
             GetDataSourceInfo(null);
             break;
         case ControlActionType.ShowProperties:
             ModalDialog dlg = new ModalDialog() { Width = 400, Height = 300, DialogStyle = ModalDialogStyles.OK };
             MemberPropertiesControl properties = new MemberPropertiesControl();
             properties.Initialize(e.UserData);
             dlg.Content = properties;
             dlg.Caption = Localization.MemberPropertiesDialog_Caption;
             Panel panel = GetRootPanel(this);
             if (panel != null)
             {
                 panel.Children.Add(dlg.Dialog.PopUpControl);
             }
             // На время убираем контекстное меню сводной таблицы
             dlg.DialogClosed += new EventHandler<DialogResultArgs>(Dlg_DialogClosed);
             PivotGrid.UseContextMenu = false;
             dlg.Show();
             break;
         case ControlActionType.ShowAttributes:
             ShowMemberAttributes(e.UserData);
             break;
     }
 }