private void RegistrationChanged(object sender, EventArgs e) { if (regComboBox.SelectedIndex < 0) { RefreshWtColor(); return; } // unsubsribe all event handlers if (controller != null) { UnSubscribe(controller); currentTable = null; controller = null; } // set currentTable and controller if (tables != null && tables.Count > 0) { var ac = aircrafts.Find(regComboBox.Text).Config; var profileName = ac.TOProfile; currentTable = tables.First(t => t.Entry.ProfileName == profileName); controller = FormControllerFactory.GetController( ControllerType.Boeing, ac, currentTable, elements, this); // TODO: only correct for Boeing. Subscribe(controller); controller.Initialize(); RefreshWtColor(); } }
public BoeingController(AircraftConfigItem ac, PerfTable acPerf, TOPerfElements elements, Control parentControl) { this.acPerf = acPerf; this.elements = elements; this.parentControl = parentControl; this.ac = ac; }
public static IFormController GetController(ControllerType type, AircraftConfigItem ac, PerfTable acPerf, LandingPerfElements elements, Control parentControl) { switch (type) { case ControllerType.Boeing: return(new BoeingController(ac, acPerf, elements, parentControl)); default: throw new ArgumentException(); } }
private void RegistrationChanged(object sender, EventArgs e) { if (regComboBox.SelectedIndex < 0) { RefreshWtColor(); return; } // unsubsribe all event handlers if (controller != null) { UnSubscribe(controller); currentTable = null; controller = null; } // set currentTable and controller if (tables != null && tables.Count > 0) { var ac = aircrafts.Find(regComboBox.Text).Config; var profileName = ac.LdgProfile; currentTable = tables.First(t => t.Entry.ProfileName == profileName); controller = GetFormController(new ControllerData() { ConfigItem = ac, PerfTable = currentTable, Elements = elements, ParentControl = this }); Subscribe(controller); UpdateFormOptions(); RefreshWtColor(); } }
private void RegistrationChanged(object sender, EventArgs e) { if (regComboBox.SelectedIndex < 0) { RefreshWtColor(); return; } // unsubsribe all event handlers if (controller != null) { UnSubscribe(controller); currentTable = null; controller = null; } var(ac, perf) = FindTable.Find(tables, aircrafts, regComboBox.Text); if (ac != null && perf != null) { // Set currentTable and controller. currentTable = perf; controller = GetController(new FormControllerData() { ConfigItem = ac.Config, PerfTable = currentTable, Elements = elements, ParentControl = this }); Subscribe(controller); UpdateFormOptions(); RefreshWtColor(); } }
public LinhaBios(byte[] param0, int param1) : base(param0, param1) { this.RomHeader = new RomHeader(param0, param1); int num = CE027.E000(param0, this.PE002, param1, false, new byte?(0)); if (this.E003(num)) { this.FE001 = new CE001(param0, num, param1); } if (this.FE001 == null || !this.FE001.PE004 || !this.PE000(this.RomHeader.E00B.PE002)) { return; } if (this.E003(this.FE001.FE004.PE001)) { this.PerfTable = new PerfTable(param0, this.FE001.FE004.PE001); } if (this.E003(this.FE001.FE004.PE005)) { this.PowerTable = new PowerTable(param0, this.FE001.FE004.PE005); } if (this.E003(this.FE001.FE004.PE004)) { this.VoltageTable = new VoltageTable(param0, this.FE001.FE004.PE004); } if (this.E003(this.FE001.FE004.PE006)) { this.BoostProfile = new BoostProfile(param0, this.FE001.FE004.PE006); } if (this.E003(this.FE001.FE004.PE007)) { this.BoostTable = new BoostTable(param0, this.FE001.FE004.PE007); } if (this.E003(this.FE001.FE004.PE008)) { this.FE006 = new CE01F(param0, this.FE001.FE004.PE008); } if (this.E003(this.FE001.FE004.PE002)) { this.FanSettings = new FanSettings(param0, this.FE001.FE004.PE002); } if (this.E003(this.FE001.FE004.PE003)) { this.FanSettings2 = new FanSettings2(param0, this.FE001.FE004.PE003); } if (!this.E003(this.FE001.FE004.PE009)) { return; } this.TempTargets = new TempTargets(param0, this.FE001.FE004.PE009); }
public void Reset() { this.AnyTextChanged = null; this._PerfTable = null; this.InternalReset(); }