void m_CustomCellConditionsEditor_SaveStyles(object sender, CustomEventArgs<ObjectDescription> e)
		{
			ObjectDescription descr = e.Args;
			if (descr != null)
			{
				StorageActionArgs args = new StorageActionArgs();
				args.ActionType = StorageActionTypes.Save;
				List<String> list = new List<string>();
				foreach (var cond in m_CustomCellConditionsEditor.CellsConditions)
				{
					list.Add(cond.Serialize());
				}
				args.Content = XmlSerializationUtility.Obj2XmlStr(list);
				args.ContentType = StorageContentTypes.CustomCellStyles;
				if (StorageManager != null)
				{
					if (String.IsNullOrEmpty(descr.Caption))
						descr.Caption = descr.Name;
					args.FileDescription = new ObjectStorageFileDescription(descr);
					StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);

				}
			}
		}
        void LoadDialog_DialogOk(object sender, EventArgs e)
        {
            ObjectLoadDialog dlg = sender as ObjectLoadDialog;
            if (dlg == null)
                return;

            if (dlg.CurrentObject != null && !String.IsNullOrEmpty(dlg.CurrentObject.ContentFileName))
            {
                StorageActionArgs args = new StorageActionArgs();
                args.ActionType = StorageActionTypes.Load;
                args.ContentType = StorageContentTypes.ValueCopySettings;
                args.FileDescription = dlg.CurrentObject;
                StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);
            }
        }
		void m_CustomCellConditionsEditor_LoadStyles(object sender, CustomEventArgs<ObjectStorageFileDescription> e)
		{
			if (e.Args != null)
			{
				StorageActionArgs args = new StorageActionArgs();
				args.ActionType = StorageActionTypes.Load;
				args.ContentType = StorageContentTypes.CustomCellStyles;
				args.FileDescription = e.Args;
				if (StorageManager != null)
				{
					StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);
				}
			}
		}
        void SaveAsDialog_DialogOk(object sender, EventArgs e)
        {
            ObjectSaveAsDialog dlg = sender as ObjectSaveAsDialog;
            if (dlg == null)
                return;

            String str = String.Empty;
            ValueCopySettingsWrapper wrapper = m_CopyControl.GetCopySettings();
            if (wrapper != null)
            {
                str = XmlSerializationUtility.Obj2XmlStr(wrapper, Common.Namespace);
            }

            StorageActionArgs args = new StorageActionArgs();
            args.ActionType = StorageActionTypes.Save;
            args.Content = str;
            args.ContentType = StorageContentTypes.ValueCopySettings;
            ObjectDescription descr = dlg.Object;
            if (descr != null && !String.IsNullOrEmpty(descr.Name))
            {
                if (String.IsNullOrEmpty(descr.Caption))
                    descr.Caption = descr.Name;
                args.FileDescription = new ObjectStorageFileDescription(descr);
                StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);
            }
            else
            {
                MessageBox.Show(Localization.ObjectSaveDialog_NameIsEmpty_Message, Localization.Warning, MessageBoxButton.OK);
            }
        }
        public void Show()
        {
            m_Dlg.Show();

            m_List.Initialize(null);

            if (m_StorageManager != null)
            {
                m_List.IsWaiting = true;

                StorageActionArgs args = new StorageActionArgs();
                args.ActionType = StorageActionTypes.GetList;
                args.ContentType = ContentType;
                m_StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);
            }
        }
 void m_List_DeleteButtonClick(object sender, CustomEventArgs<ObjectStorageFileDescription> e)
 {
     var current = m_List.CurrentObject;
     if (current != null)
     {
         StorageActionArgs args = new StorageActionArgs();
         args.ActionType = StorageActionTypes.Delete;
         args.ContentType = ContentType;
         args.FileDescription = m_List.CurrentObject;
         m_StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);
     }
 }
        void m_List_DeleteAllButtonClick(object sender, CustomEventArgs<ObjectStorageFileDescription> e)
        {
            m_List.Initialize(null);
            m_List.IsWaiting = true;

            StorageActionArgs args = new StorageActionArgs();
            args.ActionType = StorageActionTypes.Clear;
            args.ContentType = ContentType;
            m_StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);
        }
        void SaveAsDialog_DialogOk(object sender, EventArgs e)
        {
            ObjectSaveAsDialog dlg = sender as ObjectSaveAsDialog;
            if (dlg == null)
                return;

            String str = ExportMdxLayoutInfo();

            StorageActionArgs args = new StorageActionArgs();
            args.ActionType = StorageActionTypes.Save;
            args.Content = str;
            args.ContentType = StorageContentTypes.MdxDesignerLayout;
            ObjectDescription descr = dlg.Object;
            if (descr != null && !String.IsNullOrEmpty(descr.Name))
            {
                if (String.IsNullOrEmpty(descr.Caption))
                    descr.Caption = descr.Name;
                args.FileDescription = new ObjectStorageFileDescription(descr);
                StorageManager.Invoke(XmlSerializationUtility.Obj2XmlStr(args, Common.Namespace), args);
            }
            else
            {
                MessageBox.Show(Localization.ObjectSaveDialog_NameIsEmpty_Message, Localization.Warning, MessageBoxButton.OK);
            }
        }