コード例 #1
0
        private void LoadConfig()
        {
            RandomizeMode.Helper.FillComboBox(CtlRandomizer, Config, Const.Param.RandomizeMode, nameof(RandomizeMode.Random));
            CtlRandomizerParamA.Load(Config);
            CtlLearningRate.Load(Config);
            var color = Config.GetArray(Const.Param.Color, "255,255,255,255");

            CtlColor.BackColor = Color.FromArgb((int)color[0], (int)color[1], (int)color[2], (int)color[3]);

            //

            CtlTabsLayers.SuspendLayout();
            var layers = Config.GetArray(Const.Param.Layers);

            var inputLayerId  = layers.Length > 0 ? layers[0] : Const.UnknownId;
            var outputLayerId = layers.Length > 0 ? layers[layers.Length - 1] : Const.UnknownId;

            InputLayer = new InputLayerControl(inputLayerId, Config, OnNetworkUIChanged);
            CtlTabInput.Controls.Add(InputLayer);

            OutputLayer = new OutputLayerControl(outputLayerId, Config, OnNetworkUIChanged);
            CtlTabOutput.Controls.Add(OutputLayer);

            Range.ForEach(layers, l =>
            {
                if (l != layers.First() && l != layers.Last())
                {
                    AddLayer(l);
                }
            });

            CtlTabsLayers.SelectedIndex = Config.GetInt(Const.Param.SelectedLayerIndex, 0).Value;
            CtlTabsLayers.ResumeLayout();
        }
コード例 #2
0
 public void ResizeBegin()
 {
     CtlTabsLayers.SuspendLayout();
 }
コード例 #3
0
 protected override void OnResize(EventArgs e)
 {
     CtlTabsLayers.SuspendLayout();
     base.OnResize(e);
     CtlTabsLayers.ResumeLayout();// .Visible = true;
 }