public void SetSettings() { if (this.DataContext is ConditionalLayerHandler && !settingsset) { ConditionalLayerHandler context = (ConditionalLayerHandler)this.DataContext; this.trueColor.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor(context.Properties._PrimaryColor ?? System.Drawing.Color.Empty); this.falseColor.SelectedColor = Utils.ColorUtils.DrawingColorToMediaColor(context.Properties._SecondaryColor ?? System.Drawing.Color.Empty); this.conditionPath.Text = context.Properties._ConditionPath; this.keySequence.Sequence = context.Properties._Sequence; settingsset = true; } }
public Control_ConditionalLayer(ConditionalLayerHandler datacontext) { InitializeComponent(); this.DataContext = datacontext; }