Eto for Grasshopper input numerical problem

Hello, I recently encountered an ETO problem.
In grasshopper, the input value of 25 in the ETO text box will become 52. If you enter characters carelessly, the rhinoceros will crash. How to solve this problem? thank you

import Rhino
import System
import Rhino.UI
import Eto.Drawing as drawing
import Eto.Forms as forms
import Eto.Forms

decimal = 0.001  
MIN = 0 
MAX = 360 
default_value = 0 


class EtoSliderForm(forms.Form):

    def __init__(self):
        self.Title = 'test'
        self.Padding = drawing.Padding(10,2)
        self.Resizable = False
        self.Width = 500
        self.Height = 120
        
        def L(text):   
            label = forms.Label()
            label.Text = text
            label.TextAlignment = forms.TextAlignment.Left
            return label

#Slider & TextBox
        self.current_textbox = forms.TextBox(Text = str(default_value))
        self.current_textbox.TextChanging += self.OnTextChanged

### try to make the TextBox only output number, but fail -----------
        if str(self.current_textbox.Text).isnumeric():
            if float(self.current_textbox.Text) > MAX:
                self.current_textbox.Text == str(MAX)
            elif float(self.current_textbox.Text) < MIN:
                self.current_textbox.Text == str(MIN)
            else :
                self.current_textbox.Text == str(default_value)
        else :
           self.current_textbox.Text == str(default_value)
#--------------------------------------------------------------------


        self.slider = forms.Slider()
        self.slider.MinValue = MIN/decimal
        self.slider.MaxValue = MAX/decimal
        self.slider.SnapToTick = True
        self.slider.Value = float(self.current_textbox.Text)/decimal
        self.slider.ValueChanged += self.OnSliderValueChanged

        self.min_label = forms.Label()
        self.min_label.Text = str(MIN)
        self.min_label.TextAlignment = forms.TextAlignment.Left
        
        self.max_label = forms.Label()
        self.max_label.Text = str(MAX)
        self.max_label.TextAlignment = forms.TextAlignment.Right


        #slider1--layout
        layout_slider_title=forms.TableLayout()
        layout_slider_title.Spacing = drawing.Size(5, 5)
        
        layout_slider = forms.TableLayout()
        layout_slider.Spacing = drawing.Size(5, 5)
        
        layout_slider_content = forms.TableLayout()
        layout_slider_content.Spacing = drawing.Size(5, 5)
        
        #slider--Title
        layout_slider_title.Rows.Add(forms.TableRow(forms.TableCell(L("Slider"), False)))
        
        #slider--Row
        layout_slider.Rows.Add(forms.TableRow(forms.TableCell(self.slider, True)))
        
        #slider--Label(MIN,CURRENT,MAX)
        left_label_cell = forms.TableCell(self.min_label, True)
        mid_label_cell = forms.TableCell(self.current_textbox, True)
        right_label_cell = forms.TableCell(self.max_label, True)
        layout_slider_content.Rows.Add(forms.TableRow(left_label_cell,mid_label_cell,right_label_cell))

#layout
        row1 = forms.TableRow(forms.TableCell(layout_slider_title))
        row2 = forms.TableRow(forms.TableCell(layout_slider))
        row3 = forms.TableRow(forms.TableCell(layout_slider_content))
        layout = forms.TableLayout()
        layout.Rows.Add(row1)
        layout.Rows.Add(row2)
        layout.Rows.Add(row3)
        self.Content = layout


### try to make TextBox linkage with Slider, but still has some problem
    def OnTextChanged(self, sender, e):
        self.slider.Value = float(self.current_textbox.Text)/decimal
        ghenv.Component.ExpireSolution(True)

    def OnSliderValueChanged(self, sender, e):
        self.current_textbox.Text = str(self.slider.Value * decimal)
        ghenv.Component.ExpireSolution(True)


    def GetNumber(self):
        return self.current_textbox.Text



value = default_value

if show:
    if 'form' in globals():
        form.Close()
    form = EtoSliderForm();
    form.Owner = Rhino.UI.RhinoEtoApp.MainWindow
    form.Show()

if 'form' in globals():
    value = form.GetNumber()

a = value

this is the .gh file slider test.gh (3.9 KB)