Exemple #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>   Constructor de la clase.\n
        ///             Constructor. </summary>
        ///
        /// <remarks>   Javier Fernández Fernández, 05/05/2020. </remarks>
        ///
        /// <param name="typeOfExamParam">  Tipo de examen.\n
        ///                                 Type of the exam. </param>
        /// <param name="subjectParam">     Tema seleccionado.\n
        ///                                 Theme selected. </param>
        /// <param name="dataPanelParam">   Panel dondel el programa muestra todos los datos.\n
        ///                                 Panel where program show all data. </param>
        /// <param name="rightPanelParam">  Panel de la derecha.\n
        ///                                 Right panel. </param>
        /// <param name="beforeFormParam">  formulario anterior.\n
        ///                                 The before form. </param>
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        public SelectSubjectForm(string typeOfExamParam, string subjectParam, Panel dataPanelParam, Panel rightPanelParam, Form beforeFormParam)
        {
            InitializeComponent();
            dataPanel                    = dataPanelParam;
            rightPanel                   = rightPanelParam;
            subject                      = subjectParam;
            subjectSelected.Text        += subjectParam;
            labelRequestTypeOfExam.Text += typeOfExamParam;
            typeOfExam                   = typeOfExamParam;
            beforeForm                   = beforeFormParam;
            comboBoxOfThemes.Items.Add(bannerComboBox);
            ConnectionWithServer.setSelectedSUbjectForm(this);
            showHideElements(false);

            string jsonMessageAddNewNormalModification = Utilities.generateSingleDataRequest("getAllThemesFromSignature", subject);

            byte[] jSonObjectBytes = System.Text.Encoding.ASCII.GetBytes(Utilities.Encrypt(jsonMessageAddNewNormalModification, ConnectionWithServer.EncryptKey, ConnectionWithServer.IvString));
            ConnectionWithServer.ServerStream.Write(jSonObjectBytes, 0, jSonObjectBytes.Length);
            // Envio de datos mediante flush
            ConnectionWithServer.ServerStream.Flush();

            typeOfDataPanel.Focus();
        }