private bool SetStyle(RulePanel rulePanel) { var style = NodeMarkupTool.GetStyle(RegularLineStyle.RegularLineType.Dashed); rulePanel.Style.SelectedObject = style != Style.StyleType.EmptyLine ? style : (Style.StyleType)(int) RegularLineStyle.RegularLineType.Dashed; ContentPanel.ScrollToBottom(); return(true); }
private void AddRule() { if (!(EditObject is MarkupRegularLine regularLine)) { return; } var newRule = regularLine.AddRule(CanDivide); DeleteAddButton(); var rulePanel = AddRulePanel(newRule); AddAddButton(); ContentPanel.ScrollToBottom(); if (CanDivide && Settings.QuickRuleSetup) { SetupRule(rulePanel); } RefreshItem(); }