Esempio n. 1
0
 public void Merge(StatInfo statInfo)
 {
     MinSample = statInfo.MinSample;
     DigitsAfterDecimalPoint = statInfo.DigitsAfterDecimalPoint;
     Label = statInfo.Label;
     SettingsAppearanceFontBold                = statInfo.SettingsAppearanceFontBold;
     SettingsAppearanceFontBold_IsChecked      = statInfo.SettingsAppearanceFontBold_IsChecked;
     SettingsAppearanceFontFamily              = statInfo.SettingsAppearanceFontFamily;
     SettingsAppearanceFontItalic              = statInfo.SettingsAppearanceFontItalic;
     SettingsAppearanceFontItalic_IsChecked    = statInfo.SettingsAppearanceFontItalic_IsChecked;
     SettingsAppearanceFontSize                = statInfo.SettingsAppearanceFontSize;
     SettingsAppearanceFontUnderline           = statInfo.SettingsAppearanceFontUnderline;
     SettingsAppearanceFontUnderline_IsChecked = statInfo.SettingsAppearanceFontUnderline_IsChecked;
     SettingsAppearanceValueRangeCollection    = statInfo.SettingsAppearanceValueRangeCollection;
 }
Esempio n. 2
0
        public virtual StatInfo Clone()
        {
            var statInfoClone = new StatInfo();

            statInfoClone.MinSample = MinSample;
            statInfoClone.DigitsAfterDecimalPoint = DigitsAfterDecimalPoint;
            statInfoClone.Label = Label;
            statInfoClone.SettingsAppearanceFontBold                = SettingsAppearanceFontBold;
            statInfoClone.SettingsAppearanceFontBold_IsChecked      = SettingsAppearanceFontBold_IsChecked;
            statInfoClone.SettingsAppearanceFontFamily              = SettingsAppearanceFontFamily;
            statInfoClone.SettingsAppearanceFontItalic              = SettingsAppearanceFontItalic;
            statInfoClone.SettingsAppearanceFontItalic_IsChecked    = SettingsAppearanceFontItalic_IsChecked;
            statInfoClone.SettingsAppearanceFontSize                = SettingsAppearanceFontSize;
            statInfoClone.SettingsAppearanceFontUnderline           = SettingsAppearanceFontUnderline;
            statInfoClone.SettingsAppearanceFontUnderline_IsChecked = SettingsAppearanceFontUnderline_IsChecked;
            statInfoClone.GroupName    = GroupName;
            statInfoClone.Id           = Id;
            statInfoClone.CurrentValue = CurrentValue;
            statInfoClone.CurrentColor = currentColor;
            statInfoClone.Caption      = Caption;
            statInfoClone.Stat         = Stat;
            statInfoClone.SettingsPlayerType_IsChecked = SettingsPlayerType_IsChecked;
            statInfoClone.StatInfoGroup          = StatInfoGroup;
            statInfoClone.IsNotVisible           = IsNotVisible;
            statInfoClone.GraphToolIconSource    = GraphToolIconSource;
            statInfoClone.IsPopupBarNotSupported = IsPopupBarNotSupported;

            var colorRangeCloneCollection = SettingsAppearanceValueRangeCollection.Select(x => x.Clone()).OrderBy(x => x.Value).ToArray();

            statInfoClone.SettingsAppearanceValueRangeCollection = new ObservableCollection <StatInfoOptionValueRange>(colorRangeCloneCollection);

            foreach (var v in statInfoClone.SettingsAppearanceValueRangeCollection)
            {
                v.PropertyChanged += statInfoClone.SettingsAppearanceValueRangeSelectedItem_PropertyChanged;
            }

            return(statInfoClone);
        }