Пример #1
0
        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);
        }
Пример #2
0
        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();
        }