public IViewContent CreateContentForFile(OpenedFile file)
 {
     var viewCmd = new CreateDesignerCommand(file);
     viewCmd.Run();
     LoggingService.Info("DesignerBinding -> Designer started");
     return viewCmd.DesignerView;
 }
		public IViewContent CreateContentForFile(OpenedFile file)
		{
			if (file.IsDirty) {

				var reportModel = ReportModelFactory.Create();
				var xml = CreateFormSheetFromModel.ToXml(reportModel);
				
				var doc = new XmlDocument();
				doc.LoadXml(xml.ToString());
				var ar = XmlToArray(doc);
				file.SetData(ar);
			}
			
			var viewCmd = new CreateDesignerCommand(file);
			viewCmd.Run();
			LoggingService.Info("return DesignerView");
			return viewCmd.DesignerView;
		}
        public IViewContent CreateContentForFile(OpenedFile file)
        {
            //			MessageService.ShowMessage("ReportDesigner not available at the Moment","New ReportDesigner");
            //			return null;

            if (file.IsDirty) {
                MessageService.ShowMessage("ReportWizard not available at the Moment","New ReportDesigner");
                return	null;
                //				var cmd = new ReportWizardCommand(file);
                //				cmd.Run();
                //				if (cmd.Canceled) {
                //					return null;
                //				}
                //				file.SetData(cmd.GeneratedReport.ToArray());
            }

            var viewCmd = new CreateDesignerCommand(file);
            viewCmd.Run();
            //			return viewCmd.DesignerView;
            return null;
        }
		public IViewContent CreateContentForFile(OpenedFile file)
		{
			if (file.IsDirty) {
				var cmd = new ReportWizardCommand(file);
				cmd.Run();
				if (!cmd.Canceled) {
					LoggingService.Info("reportWizard canceled");
					//return null;
					var reportModel = cmd.ReportModel;
					
					var xml = CreateFormSheetFromModel.ToXml(reportModel);
					var doc = new XmlDocument();
					doc.LoadXml(xml.ToString());
					var ar = XmlToArray(doc);
					file.SetData(ar);
				} else {
					return null;
				}
			}

			var viewCmd = new CreateDesignerCommand(file);
			viewCmd.Run();
			LoggingService.Info("return DesignerView");
			return viewCmd.DesignerView;
			
			/*
			if (file.IsDirty) {

				var reportModel = ReportModelFactory.Create();
				var xml = CreateFormSheetFromModel.ToXml(reportModel);
				
				var doc = new XmlDocument();
				doc.LoadXml(xml.ToString());
				var ar = XmlToArray(doc);
				file.SetData(ar);
			}
			
			
			 */
		}