public void Initialize()
        {
            if (m_ServerExplorer.LogManager != LogManager)
                m_ServerExplorer.LogManager = LogManager;

            m_ServerExplorer.Initialize();

            m_CalculatedItemsEditor = null;

            Clear();
        }
        void m_CalculatedMemberEditor_Click(object sender, RoutedEventArgs e)
        {
            if (m_CalculatedMemberEditorModalDialog == null)
            {
                m_CalculatedMemberEditorModalDialog = new ModalDialog();
                m_CalculatedMemberEditorModalDialog.BeforeClosed += new EventHandler<DialogResultArgs>(dlg_BeforeClosed);
                m_CalculatedMemberEditorModalDialog.DialogClosed += new EventHandler<DialogResultArgs>(dlg_DialogClosed);
                m_CalculatedMemberEditorModalDialog.DialogOk += new EventHandler<DialogResultArgs>(dlg_DialogOk);
                m_CalculatedMemberEditorModalDialog.Caption = Localization.CalcMemberEditor_DialogCaption;
                m_CalculatedMemberEditorModalDialog.MinHeight = 300;
                m_CalculatedMemberEditorModalDialog.MinWidth = 300;
                m_CalculatedMemberEditorModalDialog.Height = 500;
                m_CalculatedMemberEditorModalDialog.Width = 600;
            }

            if (m_CalculatedItemsEditor == null)
            {
                m_CalculatedItemsEditor = new CalculationsEditor();
                m_CalculatedItemsEditor.EditEnd += (s, args) => { m_CalculatedMemberEditorModalDialog.ListenKeys(true); };
                m_CalculatedItemsEditor.EditStart += (s, args) => { m_CalculatedMemberEditorModalDialog.ListenKeys(false); };
                m_CalculatedMemberEditorModalDialog.Content = m_CalculatedItemsEditor;
                m_CalculatedItemsEditor.CubeBrowser.OlapDataLoader = GetOlapDataLoader();
            }
            if(m_CalculatedItemsEditor.CubeBrowser.Connection != Connection)
                m_CalculatedItemsEditor.CubeBrowser.Connection = Connection;
            if(m_CalculatedItemsEditor.CubeBrowser.CubeName != CubeName)
                m_CalculatedItemsEditor.CubeBrowser.CubeName = CubeName;
            if(m_CalculatedItemsEditor.CubeBrowser.SubCube != SubCube)
                m_CalculatedItemsEditor.CubeBrowser.SubCube = SubCube;

            Dictionary<String, CalculationInfoBase> members = new Dictionary<string, CalculationInfoBase>();
            foreach (CalcMemberInfo info in CalculatedMembers)
            {
                CalcMemberInfo cloned = info.Clone() as CalcMemberInfo;
                if (cloned != null && !members.ContainsKey(cloned.Name))
                    members.Add(cloned.Name, cloned);
            }

            Dictionary<String, CalculationInfoBase> sets = new Dictionary<string, CalculationInfoBase>();
            foreach (CalculatedNamedSetInfo info in CalculatedNamedSets)
            {
                CalculatedNamedSetInfo cloned = info.Clone() as CalculatedNamedSetInfo;
                if (cloned != null && !sets.ContainsKey(cloned.Name))
                    sets.Add(cloned.Name, cloned);
            }

            m_CalculatedItemsEditor.Initialize(members, sets, m_ServerExplorer.CubeBrowser.CubeInfo, m_ServerExplorer.CubeBrowser.CurrentMeasureGroupName);
            m_CalculatedMemberEditorModalDialog.Show();
        }
		public void Initialize()
		{
			if (m_ServerExplorer.LogManager != LogManager)
				m_ServerExplorer.LogManager = LogManager;


			m_CalculatedItemsEditor = null;
			Clear();

			m_ServerExplorer.CubeBrowser.Initialized += new EventHandler(CubeBrowser_Initialized);
			m_ServerExplorer.Initialize();
		}