public ASLVarViewerSettings(ASLEngineHook ASLEngine) { this.EngineHook = ASLEngine; InitializeComponent(); TextColor = Color.FromArgb(255, 255, 255); OverrideTextColor = false; ValueColor = Color.FromArgb(255, 255, 255); OverrideValueColor = false; BackgroundColor = Color.Transparent; BackgroundColor2 = Color.Transparent; BackgroundGradient = GradientType.Plain; Display2Rows = false; txtLabel.DataBindings.Add("Text", this, "TextLabel", false, DataSourceUpdateMode.OnPropertyChanged); chkOverrideTextColor.DataBindings.Add("Checked", this, "OverrideTextColor", false, DataSourceUpdateMode.OnPropertyChanged); btnTextColor.DataBindings.Add("BackColor", this, "TextColor", false, DataSourceUpdateMode.OnPropertyChanged); chkOverrideTimeColor.DataBindings.Add("Checked", this, "OverrideValueColor", false, DataSourceUpdateMode.OnPropertyChanged); btnTimeColor.DataBindings.Add("BackColor", this, "ValueColor", false, DataSourceUpdateMode.OnPropertyChanged); comboValue.DataBindings.Add("Text", this, "ValueSource", false, DataSourceUpdateMode.OnPropertyChanged); btnColor1.DataBindings.Add("BackColor", this, "BackgroundColor", false, DataSourceUpdateMode.OnPropertyChanged); btnColor2.DataBindings.Add("BackColor", this, "BackgroundColor2", false, DataSourceUpdateMode.OnPropertyChanged); cmbGradientType.DataBindings.Add("SelectedItem", this, "GradientString", false, DataSourceUpdateMode.OnPropertyChanged); }
public ASLVarViewerUIComponent(LiveSplitState state) { _state = state; this.EngineHook = new ASLEngineHook(state); this.Settings = new ASLVarViewerSettings(this.EngineHook); this.ContextMenuControls = new Dictionary <String, Action>(); this.Settings.ASLVarViewerLayoutChanged += Settings_ASLVarViewerLayoutChanged; this.Settings_ASLVarViewerLayoutChanged(this, null); _state.OnStart += _state_OnStart; _state.OnReset += state_OnReset; }