private void F_EditorСondition_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.IsDiscard)
            {
                return;
            }

            if (!Cl_FormulaFacade.f_GetInstance().f_Valid(m_Blocks))
            {
                MonitoringStub.Message("Формула не корректная!");
                e.Cancel = true;
            }
        }
Beispiel #2
0
        /// <summary>Указание формулы</summary>
        /// <param name="a_Formula">Формула</param>
        public void f_SetFormula(string a_Formula)
        {
            f_ClearBlocks();
            var blocks = Cl_FormulaFacade.f_GetInstance().f_GetMathematicalsBlocks(m_Elements, a_Formula);

            if (blocks != null)
            {
                foreach (var block in blocks)
                {
                    f_AppendBlock(block);
                }
            }
            f_UpdateControls(m_Blocks.Count > 0);
        }
        /// <summary>Указание формулы</summary>
        /// <param name="a_Formula">Формула</param>
        public void f_SetFormula(string a_Formula)
        {
            f_ClearBlocks();
            var blocks = Cl_FormulaFacade.f_GetInstance().f_GetConditionsBlocks(m_Elements, a_Formula);

            if (blocks != null)
            {
                foreach (var block in blocks)
                {
                    f_AppendBlock(block);
                }
            }
            if (m_Blocks.Count > 0)
            {
                m_NumberBlockOper = 4;
            }
            else
            {
                m_NumberBlockOper = 1;
            }
            f_UpdateControls(m_NumberBlockOper);
        }