static void Main()
        {
            var configManager = new ConfigManager(
                new JsonReader <Config.Config>(file),
                new JsonWriter <Config.Config>(file)
                );

            var mcduManager = new McduManager(
                new DataRefManager(),
                ref configManager
                );

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm(ref configManager, ref mcduManager));
        }
Example #2
0
        public MainForm(ref ConfigManager configManager, ref McduManager mcduManager)
        {
            InitializeComponent();

            this.configManager = configManager;
            this.mcduManager   = mcduManager;

            autoStartCheck.Checked = this.configManager.GetConfig().autoStartEnabled;
            mcdu1Check.Checked     = this.configManager.GetConfig().mcdu1Enabled;
            mcdu2Check.Checked     = this.configManager.GetConfig().mcdu2Enabled;

            mcdu1IpText.Text   = this.configManager.GetConfig().mcdu1Ip;
            mcdu1PortText.Text = this.configManager.GetConfig().mcdu1Port.ToString();

            mcdu2IpText.Text   = this.configManager.GetConfig().mcdu2Ip;
            mcdu2PortText.Text = this.configManager.GetConfig().mcdu2Port.ToString();
        }