예제 #1
0
        public Calculations(Consts consts)
        {
            this.consts = consts;
            generalFunctionsByNameFunc = new Dictionary <Enums.NameFunction, Func <float, Enums.TypeFunction, float, float> >
            {
                { Enums.NameFunction.F_4, General_F_4 },
                { Enums.NameFunction.F_Q, General_F_Q },
                { Enums.NameFunction.r, PolarCharacteristic },
            };

            functionByTypeSpiralAntennasAndTypeFunction = new Dictionary <Enums.TypeSpiralAntennas, Dictionary <Enums.TypeFunction, Func <float, float, float, float> > >
            {
                {
                    Enums.TypeSpiralAntennas.Single,
                    new Dictionary <Enums.TypeFunction, Func <float, float, float, float> >
                    {
                        { Enums.TypeFunction.E_LessOpt, FuncSingleSpiralAntenna_E_LessOpt },
                        { Enums.TypeFunction.E_Opt, FuncSingleSpiralAntenna_E_Opt },
                        { Enums.TypeFunction.E_Crit, FuncSingleSpiralAntenna_E_Crit },
                    }
                },
                {
                    Enums.TypeSpiralAntennas.System,
                    new Dictionary <Enums.TypeFunction, Func <float, float, float, float> >
                    {
                        { Enums.TypeFunction.E_LessOpt, FuncSystemSpiralAntennas_E_LessOpt },
                        { Enums.TypeFunction.E_Opt, FuncSystemSpiralAntennas_E_Opt },
                        { Enums.TypeFunction.E_Crit, FuncSystemSpiralAntennas_E_Crit },
                    }
                }
            };
        }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var consts       = new Consts();
            var calculations = new Calculations(consts);

            //подумать над переносом сюда всех форм
            Application.Run(new MainForm(consts, calculations));
        }
예제 #3
0
        public ParametrsForm(Consts consts, Calculations calculations)
        {
            this.consts       = consts;
            this.calculations = calculations;
            InitializeComponent();
            GetValuesFromTrackBars();
            dx = 1F;

            PenDrawGrid  = new Pen(Color.Green, 1);
            PenDrawAxis  = new Pen(Color.Black, 2);
            PenDrawGraph = new Pen(Color.Red, 2);
        }
예제 #4
0
        public MainForm(Consts consts, Calculations calculations)
        {
            this.consts       = consts;
            this.calculations = calculations;
            MyBootForm        = new BootForm();
            MyTestForm        = new TestForm();
            MyGrafigForm      = new ParametrsForm(consts, calculations);
            MyBootForm.ShowDialog();//окно с информацией о программе

            InitializeComponent();

            //для того чтобы вызывать func функцию из TestForm
            Delegates.EnableButtonsGraphic = new Delegates.MyEvent(ShowControl);
        }