Esempio n. 1
0
        private void dataPointListDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }

            string Function_Name             = "dataPointListDataGridView_CellDoubleClick";
            FormulaListController controller = (FormulaListController)getController();
            string formulaLblName            = formulaListDataGridView.Rows[e.RowIndex].Cells[2].Value.ToString();

            try
            {
                if (e.ColumnIndex == 7)
                {
                    if (
                        MessageBoxDialog.Show(
                            StringHelper.GetInstance().getStringValue(LanguageHelper.TrendViewer_Msg_DelConfirm, LanguageHelper.TrendViewer_Msg_DelConfirm_EN),
                            StringHelper.GetInstance().getStringValue(LanguageHelper.TrendViewer_Msg_SysMsg, LanguageHelper.TrendViewer_Msg_SysMsg_EN),
                            MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)

                    {
                        controller.DeleteByFormulaLblName(formulaLblName);
                    }
                }
                else if (e.ColumnIndex == 6)
                {
                    controller.EditFormula(formulaLblName);
                }
            }
            catch (Exception localException)
            {
                LogHelper.Error(CLASS_NAME, Function_Name, localException.ToString());
            }
        }
Esempio n. 2
0
        public void TestAddFormulaToList_DeleteByFormulaLblName_EditFormula()
        {
            EtyFormula ety = new EtyFormula();

            ety.DPLblName = "tempName";
            formulaListController.AddFormulaToList(ety);
            formulaListController.EditFormula("tempName");
            formulaListController.DeleteByFormulaLblName("tempName");
        }