예제 #1
0
        public static FunctionInfoReference CreateNew(string _expression)
        {
            FunctionInfoReference _functionInfoReference = new FunctionInfoReference(_expression);
            _functionInfoReference.expression = _expression;

            FunctionInfoReference.previousExpressions.Add(_expression);

            return _functionInfoReference;
        }
예제 #2
0
        public static FunctionInfoReference[] GetAvailableFunctions()
        {
            List<FunctionInfoReference> _functionInfos = new List<FunctionInfoReference>();

            foreach (string _expression in FunctionInfoReference.previousExpressions)
            {
                FunctionInfoReference _functionInfoReference = new FunctionInfoReference(_expression);
                _functionInfoReference.expression = _expression;
                _functionInfos.Add(_functionInfoReference);
            }

            return _functionInfos.ToArray();
        }
        protected override void OnOKButtonClicked(ref FunctionInfoBase _selectedFunction, ref bool _cancel)
        {
            base.OnOKButtonClicked(ref _selectedFunction, ref _cancel);


            if (base.tabControl1.SelectedTab == this.tabPage_Reference)
            {
                bool _bool = this.ValidateExpression();

                if (!_bool)
                {
                    _cancel = true;
                }
                else
                {
                    FunctionInfoReference _functionInfoReference = FunctionInfoReference.CreateNew(this.customComboBox_Expression.Text);
                    _selectedFunction = _functionInfoReference;
                }
            }
        }