コード例 #1
0
        public EquationExpressionBox(EquationField parentField)
        {
            ParentField = parentField ?? throw new ArgumentNullException(nameof(parentField));

            InitializeComponent();

            InputBox.ShowName         = false;
            InputBox.PropertyChanged += (s, e) =>
            {
                ExpressionField.InputBox_PropertyChanged(s, e, ResultBox, StateImage);
            };
        }
コード例 #2
0
        private void AddNewField(AppState state)
        {
            var field = new ExpressionField();

            field.InputBox.VariableName = state.GenerateFieldName().ToString();

            var listItem = new ListViewItem
            {
                HorizontalContentAlignment = HorizontalAlignment.Stretch,
                Content     = field,
                ContextMenu = field.ContextMenu
            };

            FieldItemList.Add(listItem);
        }