Exemplo n.º 1
0
        protected override Window SetOptionWindow()
        {
            LayerOptionWindow w               = new LayerOptionWindow();
            Slider            sizeSlieder     = w.FindName("SizeOption") as Slider;
            Slider            advancedSlieder = w.FindName("AdvancedOption") as Slider;

            w.SizeInt = (int)GetSetting(NumberRepresentationSettings.Percent);
            w.AdvInt  = (int)GetSetting(NumberRepresentationSettings.RowNumber);

            sizeSlieder.Maximum       = 100;
            sizeSlieder.Value         = GetSetting(NumberRepresentationSettings.Percent);
            sizeSlieder.ValueChanged += (e, s) =>
            {
                if (GetSetting(NumberRepresentationSettings.Percent) != (int)sizeSlieder.Value)
                {
                    SetSetting(NumberRepresentationSettings.Percent, (int)sizeSlieder.Value);
                    SetSetting(NumberRepresentationSettings.RowNumber, (int)advancedSlieder.Value);
                    w.SizeInt = (int)GetSetting(NumberRepresentationSettings.Percent);
                }
            };

            advancedSlieder.Maximum = neurons.Count / 4;
            advancedSlieder.Value   = GetSetting(NumberRepresentationSettings.RowNumber);

            advancedSlieder.ValueChanged += (e, s) =>
            {
                if (GetSetting(NumberRepresentationSettings.RowNumber) != (int)advancedSlieder.Value)
                {
                    SetSetting(NumberRepresentationSettings.Percent, (int)sizeSlieder.Value);
                    SetSetting(NumberRepresentationSettings.RowNumber, (int)advancedSlieder.Value);
                    w.AdvInt = (int)GetSetting(NumberRepresentationSettings.RowNumber);
                }
            };
            return(w);
        }
Exemplo n.º 2
0
        protected override Window SetOptionWindow()
        {
            LayerOptionWindow w               = new LayerOptionWindow();
            Slider            sizeSlieder     = w.FindName("SizeOption") as Slider;
            Slider            advancedSlieder = w.FindName("AdvancedOption") as Slider;

            sizeSlieder.Maximum       = neurons.Count;
            sizeSlieder.Value         = GetSetting(NumberRepresentationSettings.NeuronsOnScreen);
            w.AdvInt                  = (int)GetSetting(NumberRepresentationSettings.FirstNeuronOnScreen);
            w.SizeInt                 = (int)GetSetting(NumberRepresentationSettings.NeuronsOnScreen);
            sizeSlieder.ValueChanged += (e, s) =>
            {
                w.SizeInt = (int)GetSetting(NumberRepresentationSettings.NeuronsOnScreen);
                if (GetSetting(NumberRepresentationSettings.NeuronsOnScreen) != (int)sizeSlieder.Value)
                {
                    SetSetting(NumberRepresentationSettings.NeuronsOnScreen, (int)sizeSlieder.Value);
                }
            };


            advancedSlieder.Maximum = neurons.Count;
            advancedSlieder.Value   = GetSetting(NumberRepresentationSettings.FirstNeuronOnScreen);

            advancedSlieder.ValueChanged += (e, s) =>
            {
                w.AdvInt = (int)GetSetting(NumberRepresentationSettings.FirstNeuronOnScreen);
                if (GetSetting(NumberRepresentationSettings.FirstNeuronOnScreen) != (int)advancedSlieder.Value)
                {
                    SetSetting(NumberRepresentationSettings.FirstNeuronOnScreen, (int)advancedSlieder.Value);
                }
            };
            return(w);
        }