Пример #1
0
        public object Clone()
        {
            ConfigurationV3 result = new ConfigurationV3();

            result.TeamProjectCollection = TeamProjectCollection;
            result.TeamProject           = TeamProject;
            result.ChildItems.AddRange(ChildItems);
            result.BacklogItems.AddRange(BacklogItems);
            foreach (var state in States)
            {
                result.States.Add(state.Clone() as ICustomState);
            }
            result.SortFieldName          = SortFieldName;
            result.SortDirection          = SortDirection;
            result.RowSummaryFieldName    = RowSummaryFieldName;
            result.ColumnSummaryFieldName = ColumnSummaryFieldName;
            result.LinkType = LinkType;
            result.QueryId  = QueryId;
            result.ReportId = ReportId;
            result.ReportParameters.AddRange(ReportParameters);
            result.IsAutoRefreshChecked       = IsAutoRefreshChecked;
            result.AutoRefreshDelay           = AutoRefreshDelay;
            result.HideColumnSummaryFieldName = HideColumnSummaryFieldName;
            return(result);
        }
Пример #2
0
 private ConfigurationV3 ReadTaskboardConfigurationV3(StreamReader s, string configurationData)
 {
     Logger.Write(TraceCategory.Information, "V3 .tbconfig version is being loaded");
     try
     {
         var serializer = new DataContractSerializer(typeof(ConfigurationV3), new[] { typeof(CustomState) });
         return((ConfigurationV3)serializer.ReadObject(s.BaseStream));
     }
     // this happens if old version of .tbconfig is being loaded
     catch (SerializationException)
     {
         Logger.Write(TraceCategory.Information, "V3 .tbconfig version could not be loaded");
         s.BaseStream.Seek(0, new SeekOrigin());
         ConfigurationV2 cfgV2 = ReadTaskboardConfigurationV2(s, configurationData);
         ConfigurationV3 cfg   = new ConfigurationV3();
         cfg.CopyFromConfigurationOld2(cfgV2);
         return(cfg);
     }
 }
Пример #3
0
 public void CopyFromConfigurationOld3(ConfigurationV3 configOld3)
 {
     CopyFromConfigurationOld2(configOld3);
     HideColumnSummaryFieldName = configOld3.HideColumnSummaryFieldName;
 }