Ejemplo n.º 1
0
        private void btnSaveSettings_Click(object sender, EventArgs e)
        {
            if (txtNewTemplateName.Text.Trim() != String.Empty && rtxtMapping.Text.Trim() != String.Empty)
            {
                ExcelAccountTemplate accEx_template = new ExcelAccountTemplate();

                accEx_template = Acc_ExcelMapping();
                accEx_template.TemplateName = txtNewTemplateName.Text.Trim();
                userExcelFullAccount.Template.Add(accEx_template);
                if (SettingsManager.SaveOrUpdateAccount(userExcelFullAccount))
                {
                    ExcelSynchronizer.UpdateWatchibleFiles();
                    ExcelTab.SelectTab(Settings);
                    RefreshMapSetting();
                    btn_AddNewExcelTemplate.Enabled = false;
                    btn_delete_template.Enabled     = true;

                    dataGrid_mapping.RowCount        = 1;
                    dataGrid_mapping.Rows[0].Visible = true;  //не обязательно (если в datagridview не скрывается срока)
                    for (int i = 0; i < dataGrid_mapping.ColumnCount; i++)
                    {
                        dataGrid_mapping[i, 0].Value = null;
                    }
                }
            }
            else
            {
                label5.Show();
                label5.Text      = "Please enter token name and mapping!";
                label5.ForeColor = Color.Red;
            }
        }
Ejemplo n.º 2
0
 private void btnCancelSaveNewToken_Click(object sender, EventArgs e)
 {
     ExcelTab.SelectTab(Settings);
 }
Ejemplo n.º 3
0
 private void btn_saveMapping_Click(object sender, EventArgs e)
 {
     ExcelTab.SelectTab(Mapping);
     Write_RichTextBox();
     btnChekMapping.Enabled = true;
 }