示例#1
0
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
 {
     ConvertXml(parameters);
     if (string.CompareOrdinal("RuntimeCalculatedColumn", parameters.XmlNodeName) == 0)
     {
         parameters.NodeType = typeof(IModelColumn);
         string name = parameters.Values["Id"];
         if (parameters.Values.ContainsKey("CalcPropertyName"))
         {
             name = parameters.Values["CalcPropertyName"];
             parameters.Values.Remove("CalcPropertyName");
         }
         parameters.Values.Add("PropertyName", name);
     }
     if (typeof(IModelListViewLoadWhenFiltered).IsAssignableFrom(parameters.NodeType) && parameters.Values.ContainsKey("LoadWhenFiltered"))
     {
         if (parameters.Values["LoadWhenFiltered"] == "True")
         {
             parameters.Values["LoadWhenFiltered"] = LoadWhenFiltered.FilterAndCriteria.ToString();
         }
         else if (parameters.Values["LoadWhenFiltered"] == "False")
         {
             parameters.Values["LoadWhenFiltered"] = LoadWhenFiltered.No.ToString();
         }
     }
 }
示例#2
0
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
 {
     ConvertXml(parameters);
     if (parameters.XmlNodeName == "GridColumnOptions")
     {
         parameters.NodeType = typeof(IModelOptionsColumnGridView);
     }
 }
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters) {
     ConvertXml(parameters);
     if (typeof(IModelListView).IsAssignableFrom(parameters.NodeType)&&parameters.ContainsKey("IsClonable")) {
         var value = parameters.Values["IsClonable"];
         parameters.Values.Remove("IsClonable");
         parameters.Values.Add(new KeyValuePair<string, string>("IsViewClonable",value));
     }
 }
 public void ConvertXml(ConvertXmlParameters parameters) {
     if (typeof(IModelListView).IsAssignableFrom(parameters.NodeType) &&
         parameters.Values.ContainsKey("EditorTypeName")) {
         if (parameters.Values["EditorTypeName"] ==
             "Xpand.ExpressApp.TreeListEditors.Win.XpandCategorizedListEditor")
             parameters.Values["EditorTypeName"] =
                 "Xpand.ExpressApp.TreeListEditors.Win.ListEditor.XpandCategorizedListEditor";
     }
 }
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
 {
     ConvertXml(parameters);
     if (typeof(IModelListView).IsAssignableFrom(parameters.NodeType) && parameters.ContainsKey("IsClonable"))
     {
         var value = parameters.Values["IsClonable"];
         parameters.Values.Remove("IsClonable");
         parameters.Values.Add(new KeyValuePair <string, string>("IsViewClonable", value));
     }
 }
示例#6
0
 public void ConvertXml(ConvertXmlParameters parameters)
 {
     if (typeof(IModelListView).IsAssignableFrom(parameters.NodeType) && parameters.Values.ContainsKey("EditorTypeName"))
     {
         if (parameters.Values["EditorTypeName"] == "Xpand.ExpressApp.TreeListEditors.Win.XpandCategorizedListEditor")
         {
             parameters.Values["EditorTypeName"] = "Xpand.ExpressApp.TreeListEditors.Win.ListEditor.XpandCategorizedListEditor";
         }
     }
 }
示例#7
0
 public void ConvertXml(ConvertXmlParameters parameters) {
     if (typeof(IModelExecutionContext).IsAssignableFrom(parameters.NodeType)) {
         switch (parameters.Values["Name"]) {
             case "ViewControlAdding":
                 parameters.Values["Name"] = ExecutionContext.ViewChanged.ToString();
                 break;
             case "ObjectChanged":
                 parameters.Values["Name"] = ExecutionContext.ObjectSpaceObjectChanged.ToString();
                 break;
         }
     }
 }
示例#8
0
文件: Module.cs 项目: xyyhqq/eXpand
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
 {
     if (typeof(IModelMapView).IsAssignableFrom(parameters.NodeType))
     {
         const string oldPropertyName = "InfoWindowText";
         if (parameters.ContainsKey(oldPropertyName))
         {
             parameters.Values["InfoWindowTextMember"] = parameters.Values[oldPropertyName];
             parameters.Values.Remove(oldPropertyName);
         }
     }
 }
示例#9
0
文件: Module.cs 项目: aries544/eXpand
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
 {
     if (typeof(IModelMapView).IsAssignableFrom(parameters.NodeType))
     {
         const string oldPropertyName = "InfoWindowText";
         if (parameters.ContainsKey(oldPropertyName))
         {
             parameters.Values["InfoWindowTextMember"] = parameters.Values[oldPropertyName];
             parameters.Values.Remove(oldPropertyName);
         }
     }
 }
示例#10
0
 public void ConvertXml(ConvertXmlParameters parameters)
 {
     if (typeof(IModelMember).IsAssignableFrom(parameters.NodeType))
     {
         if (parameters.Values.ContainsKey("IsRuntimeMember") && parameters.XmlNodeName == "Member" && parameters.Values["IsRuntimeMember"].ToLower() == "true")
         {
             parameters.NodeType = typeof(IModelMemberPersistent);
         }
     }
     if (parameters.XmlNodeName == "CalculatedRuntimeMember")
     {
         parameters.NodeType = typeof(IModelMemberCalculated);
     }
 }
示例#11
0
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters) {
     ConvertXml(parameters);
     switch (parameters.XmlNodeName) {
         case "ConditionalDetailView":
             parameters.NodeType = typeof(IModelLogicConditionalObjectView);
             break;
         case "ConditionalDetailViewRule":
             parameters.NodeType = typeof(IModelObjectViewRule);
             break;
         case "ConditionalObjectViewRule":
             parameters.NodeType = typeof(IModelObjectViewRule);
             break;
     }
 }
示例#12
0
        public void ConvertXml(ConvertXmlParameters parameters)
        {
            if (typeof(IModelExecutionContext).IsAssignableFrom(parameters.NodeType))
            {
                switch (parameters.Values["Name"])
                {
                case "ViewControlAdding":
                    parameters.Values["Name"] = ExecutionContext.ViewChanged.ToString();
                    break;

                case "ObjectChanged":
                    parameters.Values["Name"] = ExecutionContext.ObjectSpaceObjectChanged.ToString();
                    break;
                }
            }
        }
示例#13
0
        void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
        {
            ConvertXml(parameters);
            switch (parameters.XmlNodeName)
            {
            case "ConditionalDetailView":
                parameters.NodeType = typeof(IModelLogicConditionalObjectView);
                break;

            case "ConditionalDetailViewRule":
                parameters.NodeType = typeof(IModelObjectViewRule);
                break;

            case "ConditionalObjectViewRule":
                parameters.NodeType = typeof(IModelObjectViewRule);
                break;
            }
        }
示例#14
0
 public void ConvertXml(ConvertXmlParameters parameters) {
     if (typeof(IModelMember).IsAssignableFrom(parameters.NodeType)) {
         if (parameters.Values.ContainsKey("IsRuntimeMember") && parameters.XmlNodeName == "Member" && parameters.Values["IsRuntimeMember"].ToLower() == "true")
             parameters.NodeType = typeof(IModelRuntimeMember);
     }
     if (parameters.XmlNodeName == "CalculatedRuntimeMember") {
         parameters.NodeType = typeof(IModelRuntimeCalculatedMember);
     }
 }
示例#15
0
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters) {
     ConvertXml(parameters);
     var currentVersion = new Version(XpandAssemblyInfo.Version);
     if (currentVersion>new Version("0.0.0.0")&&currentVersion<new Version("14.1.5.2")){
         if (string.CompareOrdinal("RuntimeCalculatedColumn", parameters.XmlNodeName)==0){
             parameters.NodeType = typeof (IModelColumn);
             string name = parameters.Values["Id"];
             if (parameters.Values.ContainsKey("CalcPropertyName")) {
                 name = parameters.Values["CalcPropertyName"];
                 parameters.Values.Remove("CalcPropertyName");
             }
             parameters.Values.Add("PropertyName",name);
         }
         if (typeof(IModelListViewPreventDataLoading).IsAssignableFrom(parameters.NodeType) && parameters.Values.ContainsKey("PreventLoadingData")) {
             if (parameters.Values["LoadWhenFiltered"] == "True") {
                 parameters.Values["LoadWhenFiltered"] = "FilterAndCriteria";
             }
             else if (parameters.Values["LoadWhenFiltered"] == "False") {
                 parameters.Values["LoadWhenFiltered"] = "No";
             }
         }
     }
     if (currentVersion > new Version("14.1.5.1")){
         if (typeof (IModelListViewPreventDataLoading).IsAssignableFrom(parameters.NodeType)){
             if (parameters.Values.ContainsKey("LoadWhenFiltered")){
                 string value = parameters.Values["LoadWhenFiltered"];
                 if (!string.IsNullOrEmpty(value)){
                     if (value == "No")
                         parameters.Values["PreventLoadingData"] = "Never";
                     else if (value=="Filter")
                         parameters.Values["PreventLoadingData"] = "FiltersEmpty";
                     else if (value == "FilterAndCriteria")
                         parameters.Values["PreventLoadingData"] = "SearchOrFiltersOrCriteriaEmpty";
                     else{
                         parameters.Values["PreventLoadingData"] = value;
                     }
                 }
             }
         }
     }
     if (currentVersion > new Version("14.1.5.3")){
         if (typeof (IModelListViewPreventDataLoading).IsAssignableFrom(parameters.NodeType)){
             if (parameters.Values.ContainsKey("SearchAndFiltersEmpty")) {
                 string value = parameters.Values["SearchAndFiltersEmpty"];
                 if (!string.IsNullOrEmpty(value)){
                     parameters.Values["SearchAndFiltersEmpty"] = "FiltersEmpty";
                 }
             }
             if (parameters.Values.ContainsKey("SearchAndFiltersAndCriteriaEmpty")) {
                 string value = parameters.Values["SearchAndFiltersAndCriteriaEmpty"];
                 if (!string.IsNullOrEmpty(value)){
                     parameters.Values["SearchAndFiltersAndCriteriaEmpty"] = "FiltersAndCriteriaEmpty";
                 }
             }
         }
     }
 }
示例#16
0
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters) {
     ConvertXml(parameters);
     if (string.CompareOrdinal("RuntimeCalculatedColumn", parameters.XmlNodeName)==0){
         parameters.NodeType = typeof (IModelColumn);
         string name = parameters.Values["Id"];
         if (parameters.Values.ContainsKey("CalcPropertyName")) {
             name = parameters.Values["CalcPropertyName"];
             parameters.Values.Remove("CalcPropertyName");
         }
         parameters.Values.Add("PropertyName",name);
     }
 }
示例#17
0
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
 {
     ConvertXml(parameters);
 }
        void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters)
        {
            ConvertXml(parameters);
            var currentVersion = new Version(XpandAssemblyInfo.Version);

            if (currentVersion > new Version("0.0.0.0") && currentVersion < new Version("14.1.5.2"))
            {
                if (string.CompareOrdinal("RuntimeCalculatedColumn", parameters.XmlNodeName) == 0)
                {
                    parameters.NodeType = typeof(IModelColumn);
                    string name = parameters.Values["Id"];
                    if (parameters.Values.ContainsKey("CalcPropertyName"))
                    {
                        name = parameters.Values["CalcPropertyName"];
                        parameters.Values.Remove("CalcPropertyName");
                    }
                    parameters.Values.Add("PropertyName", name);
                }
                if (typeof(IModelListViewPreventDataLoading).IsAssignableFrom(parameters.NodeType) && parameters.Values.ContainsKey("PreventLoadingData"))
                {
                    if (parameters.Values["LoadWhenFiltered"] == "True")
                    {
                        parameters.Values["LoadWhenFiltered"] = "FilterAndCriteria";
                    }
                    else if (parameters.Values["LoadWhenFiltered"] == "False")
                    {
                        parameters.Values["LoadWhenFiltered"] = "No";
                    }
                }
            }
            if (currentVersion > new Version("14.1.5.1"))
            {
                if (typeof(IModelListViewPreventDataLoading).IsAssignableFrom(parameters.NodeType))
                {
                    if (parameters.Values.ContainsKey("LoadWhenFiltered"))
                    {
                        string value = parameters.Values["LoadWhenFiltered"];
                        if (!string.IsNullOrEmpty(value))
                        {
                            if (value == "No")
                            {
                                parameters.Values["PreventLoadingData"] = "Never";
                            }
                            else if (value == "Filter")
                            {
                                parameters.Values["PreventLoadingData"] = "FiltersEmpty";
                            }
                            else if (value == "FilterAndCriteria")
                            {
                                parameters.Values["PreventLoadingData"] = "SearchOrFiltersOrCriteriaEmpty";
                            }
                            else
                            {
                                parameters.Values["PreventLoadingData"] = value;
                            }
                        }
                    }
                }
            }
            if (currentVersion > new Version("14.1.5.3"))
            {
                if (typeof(IModelListViewPreventDataLoading).IsAssignableFrom(parameters.NodeType))
                {
                    if (parameters.Values.ContainsKey("SearchAndFiltersEmpty"))
                    {
                        string value = parameters.Values["SearchAndFiltersEmpty"];
                        if (!string.IsNullOrEmpty(value))
                        {
                            parameters.Values["SearchAndFiltersEmpty"] = "FiltersEmpty";
                        }
                    }
                    if (parameters.Values.ContainsKey("SearchAndFiltersAndCriteriaEmpty"))
                    {
                        string value = parameters.Values["SearchAndFiltersAndCriteriaEmpty"];
                        if (!string.IsNullOrEmpty(value))
                        {
                            parameters.Values["SearchAndFiltersAndCriteriaEmpty"] = "FiltersAndCriteriaEmpty";
                        }
                    }
                }
            }
        }
示例#19
0
 public void ConvertXml(ConvertXmlParameters parameters) {
     if (typeof(IModelExecutionContext).IsAssignableFrom(parameters.NodeType))
         if (parameters.Values["Name"] == "ViewControlAdding") {
             parameters.Values["Name"] = ExecutionContext.ViewChanged.ToString();
         }
 }
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters) {
     ConvertXml(parameters);
     if (parameters.XmlNodeName == "GridColumnOptions")
         parameters.NodeType = typeof (IModelOptionsColumnGridView);
     
 }
示例#21
0
 void IModelXmlConverter.ConvertXml(ConvertXmlParameters parameters) {
     ConvertXml(parameters);
     if (string.CompareOrdinal("RuntimeCalculatedColumn", parameters.XmlNodeName)==0){
         parameters.NodeType = typeof (IModelColumn);
         string name = parameters.Values["Id"];
         if (parameters.Values.ContainsKey("CalcPropertyName")) {
             name = parameters.Values["CalcPropertyName"];
             parameters.Values.Remove("CalcPropertyName");
         }
         parameters.Values.Add("PropertyName",name);
     }
     if (typeof(IModelListViewLoadWhenFiltered).IsAssignableFrom(parameters.NodeType) && parameters.Values.ContainsKey("LoadWhenFiltered")) {
         if (parameters.Values["LoadWhenFiltered"] == "True"){
             parameters.Values["LoadWhenFiltered"] = LoadWhenFiltered.FilterAndCriteria.ToString();
         }
         else if (parameters.Values["LoadWhenFiltered"] == "False"){
             parameters.Values["LoadWhenFiltered"] = LoadWhenFiltered.No.ToString();
         }
     }
 }