public FConnectionsList(AntennaeRotatorConfig fs) { InitializeComponent(); config = fs; fillList(); if (lbConnections.Items.Count > 0) { lbConnections.SelectedIndex = 0; } }
public FRotator(JCAppContext appContext) { InitializeComponent(); config = appContext.config.antennaeRotatorConfig; updateConnectionsMenu(); Trace.Listeners.Add(new TextWriterTraceListener(Application.StartupPath + "\\rotator.log")); Trace.AutoFlush = true; Trace.Indent(); Trace.WriteLine("Initialization"); string currentMapStr = ""; if (this.config.currentMap != -1 && this.config.currentMap < this.config.maps.Count) { currentMapStr = this.config.maps[this.config.currentMap]; } this.config.maps.RemoveAll(item => !File.Exists(item)); if (!currentMapStr.Equals(string.Empty)) { this.config.currentMap = this.config.maps.IndexOf(currentMapStr); } else { this.config.currentMap = -1; } this.config.maps.ForEach(item => loadMap(item)); if (this.config.currentMap != -1) { setCurrentMap(this.config.currentMap); } else if (this.config.maps.Count > 0) { setCurrentMap(0); } prevHeight = Height; }