예제 #1
0
 public void Assign(LayoutSettings settings)
 {
     TextColor = settings.TextColor;
     BackgroundColor = settings.BackgroundColor;
     BackgroundColor2 = settings.BackgroundColor2;
     ThinSeparatorsColor = settings.ThinSeparatorsColor;
     SeparatorsColor = settings.SeparatorsColor;
     PersonalBestColor = settings.PersonalBestColor;
     AheadGainingTimeColor = settings.AheadGainingTimeColor;
     AheadLosingTimeColor = settings.AheadLosingTimeColor;
     BehindGainingTimeColor = settings.BehindGainingTimeColor;
     BehindLosingTimeColor = settings.BehindLosingTimeColor;
     BestSegmentColor = settings.BestSegmentColor;
     UseRainbowColor = settings.UseRainbowColor;
     NotRunningColor = settings.NotRunningColor;
     PausedColor = settings.PausedColor;
     ShadowsColor = settings.ShadowsColor;
     TimerFont = settings.TimerFont.Clone() as Font;
     TimesFont = settings.TimesFont.Clone() as Font;
     TextFont = settings.TextFont.Clone() as Font;
     ShowBestSegments = settings.ShowBestSegments;
     AlwaysOnTop = settings.AlwaysOnTop;
     AntiAliasing = settings.AntiAliasing;
     DropShadows = settings.DropShadows;
     Opacity = settings.Opacity;
     BackgroundType = settings.BackgroundType;
     BackgroundImage = settings.BackgroundImage;
     ImageOpacity = settings.ImageOpacity;
     ImageBlur = settings.ImageBlur;
 }
예제 #2
0
        public object Clone()
        {
            var settings = new LayoutSettings();

            settings.Assign(this);
            return(settings);
        }
예제 #3
0
        public LayoutSettingsControl(LiveSplit.UI.LayoutSettings settings, ILayout layout)
        {
            InitializeComponent();
            Settings = settings;
            Layout   = layout;
            chkBestSegments.DataBindings.Add("Checked", Settings, "ShowBestSegments", false, DataSourceUpdateMode.OnPropertyChanged);
            chkAlwaysOnTop.DataBindings.Add("Checked", Settings, "AlwaysOnTop", false, DataSourceUpdateMode.OnPropertyChanged);
            chkAntiAliasing.DataBindings.Add("Checked", Settings, "AntiAliasing", false, DataSourceUpdateMode.OnPropertyChanged);
            chkDropShadows.DataBindings.Add("Checked", Settings, "DropShadows", false, DataSourceUpdateMode.OnPropertyChanged);
            chkRainbow.DataBindings.Add("Checked", Settings, "UseRainbowColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnTextColor.DataBindings.Add("BackColor", Settings, "TextColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBackground.DataBindings.Add("BackColor", Settings, "BackgroundColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBackground2.DataBindings.Add("BackColor", Settings, "BackgroundColor2", false, DataSourceUpdateMode.OnPropertyChanged);
            btnThinSep.DataBindings.Add("BackColor", Settings, "ThinSeparatorsColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnSeparators.DataBindings.Add("BackColor", Settings, "SeparatorsColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnPB.DataBindings.Add("BackColor", Settings, "PersonalBestColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnGlod.DataBindings.Add("BackColor", Settings, "BestSegmentColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnAheadGaining.DataBindings.Add("BackColor", Settings, "AheadGainingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnAheadLosing.DataBindings.Add("BackColor", Settings, "AheadLosingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBehindGaining.DataBindings.Add("BackColor", Settings, "BehindGainingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnBehindLosing.DataBindings.Add("BackColor", Settings, "BehindLosingTimeColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnNotRunning.DataBindings.Add("BackColor", Settings, "NotRunningColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnPausedColor.DataBindings.Add("BackColor", Settings, "PausedColor", false, DataSourceUpdateMode.OnPropertyChanged);
            btnShadowsColor.DataBindings.Add("BackColor", Settings, "ShadowsColor", false, DataSourceUpdateMode.OnPropertyChanged);
            lblTimer.DataBindings.Add("Text", this, "TimerFont", false, DataSourceUpdateMode.OnPropertyChanged);
            lblText.DataBindings.Add("Text", this, "SplitNamesFont", false, DataSourceUpdateMode.OnPropertyChanged);
            lblTimes.DataBindings.Add("Text", this, "MainFont", false, DataSourceUpdateMode.OnPropertyChanged);
            trkOpacity.DataBindings.Add("Value", this, "Opacity", false, DataSourceUpdateMode.OnPropertyChanged);
            trkImageOpacity.DataBindings.Add("Value", this, "ImageOpacity", false, DataSourceUpdateMode.OnPropertyChanged);
            trkBlur.DataBindings.Add("Value", this, "ImageBlur", false, DataSourceUpdateMode.OnPropertyChanged);

            cmbBackgroundType.SelectedItem = GetBackgroundTypeString(Settings.BackgroundType);
            originalBackgroundImage        = Settings.BackgroundImage;
        }
예제 #4
0
 public void Assign(LayoutSettings settings)
 {
     TextColor              = settings.TextColor;
     BackgroundColor        = settings.BackgroundColor;
     BackgroundColor2       = settings.BackgroundColor2;
     ThinSeparatorsColor    = settings.ThinSeparatorsColor;
     SeparatorsColor        = settings.SeparatorsColor;
     PersonalBestColor      = settings.PersonalBestColor;
     AheadGainingTimeColor  = settings.AheadGainingTimeColor;
     AheadLosingTimeColor   = settings.AheadLosingTimeColor;
     BehindGainingTimeColor = settings.BehindGainingTimeColor;
     BehindLosingTimeColor  = settings.BehindLosingTimeColor;
     BestSegmentColor       = settings.BestSegmentColor;
     UseRainbowColor        = settings.UseRainbowColor;
     NotRunningColor        = settings.NotRunningColor;
     PausedColor            = settings.PausedColor;
     ShadowsColor           = settings.ShadowsColor;
     TimerFont              = settings.TimerFont.Clone() as Font;
     TimesFont              = settings.TimesFont.Clone() as Font;
     TextFont            = settings.TextFont.Clone() as Font;
     ShowBestSegments    = settings.ShowBestSegments;
     AlwaysOnTop         = settings.AlwaysOnTop;
     AntiAliasing        = settings.AntiAliasing;
     DropShadows         = settings.DropShadows;
     Opacity             = settings.Opacity;
     BackgroundType      = settings.BackgroundType;
     BackgroundImage     = settings.BackgroundImage;
     BackgroundImagePath = settings.BackgroundImagePath;
     ImageOpacity        = settings.ImageOpacity;
     ImageBlur           = settings.ImageBlur;
 }
예제 #5
0
 public object Clone()
 {
     var settings = new LayoutSettings();
     settings.Assign(this);
     return settings;
 }