﻿//using UnityEngine;
//using WHEResources = WhormholeExtreme.Properties.Resources;
//using KSPPluginFramework;
//using System.Linq;

//namespace WhormholeExtreme.TrackingStation
//{
//    [KSPAddon(KSPAddon.Startup.TrackingStation, false)]
//    public class NetworkTrackingStation : ExMonoBehaviour
//    {
//        AppLauncherButton button;
//        HintWindow hintWindow;
//        GUIWindow window;
//        ViewWindow window2;

//        ModuleManager<Testpart> manager = new ModuleManager<Testpart>();

//        protected override void OnAwake()
//        {
//            base.OnAwake();

//            this.button = new AppLauncherButton(WHEResources.ApplicationLauncherButtonIcon_Active, WHEResources.ApplicationLauncherButtonIcon_Inactive, ApplicationLauncher.AppScenes.TRACKSTATION);
//            this.button.OnToggleState += button_OnToggleState;

//            this.hintWindow = new HintWindow("Dies ist eine Hinweismeldung!");
//            this.hintWindow.OnOK += delegate { WindowManager.Instance.Remove(this.hintWindow); };
//            WindowManager.Instance.Add(this.hintWindow);

//            this.window = new GUIWindow(666, "Gate Network", this.OnDrawWindow);
//            WindowManager.Instance.Add(window);

//            this.window2 = new ViewWindow(668, "Gate Network", this.GetView);
//            WindowManager.Instance.Add(window2);

//            SoundManager.Instance.StartPlay("KSPPF_Alarm", true);
//        }

//        void button_OnToggleState(bool newState)
//        {
//            if (this.window == null) return;

//            this.window.Show = newState;
//        }

//        private IView GetView()
//        {
//            VerticalView vv = new VerticalView();
//            vv.Views.Add(new LabelView(string.Format("- Es sind derzeit {0} Gates platziert -", this.manager.Count)));

//            foreach (var module in this.manager)
//                vv.Views.Add(new LabelView(module.name));

//            return vv;
//        }

//        void OnDrawWindow()
//        {
//            GUILayout.BeginVertical();
//            GUILayout.Label(string.Format("- Es sind derzeit {0} Gates platziert -", this.manager.Count));
//            //foreach (var module in Modules)
//            //    GUILayout.Label(module.vessel.GetPlanetName());
//            GUILayout.EndVertical();
//        }
//    }
//}
