示例#1
0
 /// <summary>
 /// This function clears all the fields in all groups.
 /// </summary>
 private void ClearEditorGroupsData()
 {
     //Clear std translations
     Text_TextOnly_EngMY.Text = "";
     Btn_TextOnly_ReplicateMY.PerformClick();
     //Clear fixed translations
     Text_Fixed_ValueDescription.Text = "";
     Text_Fixed_MY.Text = "";
     Btn_Fixed_ReplicateMY.PerformClick();
     Cmb_Fixed_ValueType.SelectedIndex = MyronWebUAT.admin_notSelected;
     //Clear conditional translations
     Text_Cdtl_MY.Text = "";
     Btn_Cdtl_ReplicateMY.PerformClick();
     Text_Cdtl_ElseMY.Text = "";
     Btn_Cdtl_ELSE_ReplicateMY.PerformClick();
     Text_Cdtl_ValueDescriptor.Text = "";
     Chck_Cdtl_UsesVariable.Checked = false;
     Text_Cdtl_Variable.Text        = "";
     //Clear Data Row fields
     Btn_DataRow_Cancel.PerformClick();
     Text_DataRow_Description.Text = "";
     currentDataRow = null;
     dataRowNewPart = MyronWebUAT.admin_notSelected;
     FillDataRowPartsList(null);
     //Clear Template fields
     currentTemplate                 = null;
     Text_Temp_Description.Text      = "";
     Cmb_Temp_DataRows.SelectedIndex = MyronWebUAT.admin_notSelected;
     Cmb_Temp_DataRows.Items.Clear();
     List_Temp_ItemSize.Items.Clear();
     List_Temp_ImprintArea.Items.Clear();
     List_Temp_Charges.Items.Clear();
     Radio_Temp_ItemSize.Checked = true;
 }
示例#2
0
 private void Btn_DataRow_Delete_Click(object sender, EventArgs e)
 {
     if (List_DataRow_Parts.SelectedIndex != MyronWebUAT.admin_notSelected)
     {
         Btn_DataRow_Cancel.PerformClick();
         currentDataRow.dataRowParts.RemoveAt(List_DataRow_Parts.SelectedIndex);
         //Refresh both List and Final Data Textbox
         FillDataRowPartsList(currentDataRow.dataRowParts);
     }
 }
示例#3
0
        private void Btn_DataRow_Add_Click(object sender, EventArgs e)
        {
            if (dataRowNewPart == MyronWebUAT.dataType_customText && Text_DataRow_CustomText.Text != "")
            {
                Translation customText = new Translation(MyronWebUAT.dataType_customText, Text_DataRow_CustomText.Text, Text_DataRow_CustomText.Text, Text_DataRow_CustomText.Text);
                //Save the new customText in the controller
                controller.customTextTranslations.Add(customText);
                //New Custom text created and added to the datarow
                currentDataRow.dataRowParts.Add(customText.translationID);
                //Update the list
                List_DataRow_Parts.Items.Add(customText.eng_MY);
                List_DataRow_Parts.Refresh();
                RefreshFinalDataRowTextBox();
                HideDataRowCustomTextField();
            }
            else if (dataRowNewPart == MyronWebUAT.dataType_stdTranslation && Cmb_DataRow_Translations.SelectedIndex != MyronWebUAT.admin_notSelected)
            {
                Translation stdTranslation = controller.standardTranslations[Cmb_DataRow_Translations.SelectedIndex];
                //Std translation added to the datarow
                currentDataRow.dataRowParts.Add(stdTranslation.translationID);
                //Update the list
                List_DataRow_Parts.Items.Add(stdTranslation.eng_MY);
                List_DataRow_Parts.Refresh();
                RefreshFinalDataRowTextBox();
                //Make the Cmb visilble and its label
                Cmb_DataRow_Translations.Visible      = false;
                Lbl_DataRow_SelectTranslation.Visible = false;
                Cmb_DataRow_Translations.Items.Clear();
            }
            else if (dataRowNewPart == MyronWebUAT.dataType_fixedTranslation && Cmb_DataRow_Translations.SelectedIndex != MyronWebUAT.admin_notSelected)
            {
                ValuedFixedTranslation fixedTranslation = controller.fixedTranslations[Cmb_DataRow_Translations.SelectedIndex];
                //Fixed translation added to the datarow
                currentDataRow.dataRowParts.Add(fixedTranslation.translationID);
                //Update the list with the description
                List_DataRow_Parts.Items.Add(fixedTranslation.valueDescription);
                List_DataRow_Parts.Refresh();
                RefreshFinalDataRowTextBox();
                //Make the Cmb visilble and its label
                Cmb_DataRow_Translations.Visible      = false;
                Lbl_DataRow_SelectTranslation.Visible = false;
                Cmb_DataRow_Translations.Items.Clear();
            }
            else if (dataRowNewPart == MyronWebUAT.dataType_conditionedTranslation && Cmb_DataRow_Translations.SelectedIndex != MyronWebUAT.admin_notSelected)
            {
                ValuedConditionedTranslation conditionedTranslation = controller.conditionedTranslations[Cmb_DataRow_Translations.SelectedIndex];
                //Conditioned translation added to the datarow
                currentDataRow.dataRowParts.Add(conditionedTranslation.translationID);
                //Update the list with the description
                List_DataRow_Parts.Items.Add(conditionedTranslation.valueDescription);
                List_DataRow_Parts.Refresh();
                RefreshFinalDataRowTextBox();
                //Make the Cmb visilble and its label
                Cmb_DataRow_Translations.Visible      = false;
                Lbl_DataRow_SelectTranslation.Visible = false;
                Cmb_DataRow_Translations.Items.Clear();
            }

            Text_DataRow_CustomText.Text = "";
            Btn_DataRow_Cancel.PerformClick();
        }