コード例 #1
0
        /*GET PROPERTIES AND ADD INTO LIST*/
        private void Get_Font()
        {
            // get player font
            if (Screen_form.player_font_name_tb.Text != "")
            {
                Data_packet.Add(Screen_form.player_font_name_tb.Text);
            }
            else
            {
                Data_packet.Add("Roboto Light");
            }

            if (Screen_form.player_font_size_tb.Text != "")
            {
                Data_packet.Add(Screen_form.player_font_size_tb.Text);
            }
            else
            {
                Data_packet.Add("72");
            }

            if (Screen_form.player_font_color_tb.Text != "")
            {
                Data_packet.Add(Screen_form.player_font_color_tb.Text);
            }
            else
            {
                Data_packet.Add("Black");
            }


            // get score font

            if (Screen_form.score_font_name_tb.Text != "")
            {
                Data_packet.Add(Screen_form.score_font_name_tb.Text);
            }
            else
            {
                Data_packet.Add("Roboto Light");
            }

            if (Screen_form.score_font_size_tb.Text != "")
            {
                Data_packet.Add(Screen_form.score_font_size_tb.Text);
            }
            else
            {
                Data_packet.Add("72");
            }

            if (Screen_form.score_font_color_tb.Text != "")
            {
                Data_packet.Add(Screen_form.score_font_color_tb.Text);
            }
            else
            {
                Data_packet.Add("Black");
            }
        }
コード例 #2
0
        private void Get_Screen_Color()
        {
            Data_packet.Add(ConvertHex_Color(Screen_form.color_top_screen));
            Data_packet.Add(ConvertHex_Color(Screen_form.color_bottom_screen));

            //write to log
            log_class.WriteLog_toTextBox("User has changed name screen color - hex color : " + ConvertHex_Color(Screen_form.color_top_screen));
            log_class.WriteLog_toTextBox("User has changed score screen color - hex color : " + ConvertHex_Color(Screen_form.color_bottom_screen));
        }
コード例 #3
0
        /*SAVE PROPERTIES*/
        public void Apply_Settings()
        {
            // Clear Packet if click again
            Data_packet.Clear();

            // check screen
            Get_Font();
            Get_Screen_Color();

            //Phân tích thành mảng byte gửi đi
            Serialize_DataPacket_toByte(Data_packet);
        }