예제 #1
0
        public void Init(bool _runTestPortServer)
        {
            runTestPortServer = _runTestPortServer;

            // LAN
            Network.IPHelper helper = new Network.IPHelper();
            LAN_address = helper.GetLocalIP();
            LAN_port    = Settings.Default.Port.ToString();
            WAN_port    = LAN_port;


            if (!Settings.Default.DynamicDNSServiceUsed)
            {
                //  We need the external IP
                helper.QueryExternalIPAsync_Completed += new EventHandler <Network.IPHelper.GetExternalIPEventArgs>(helper_QueryExternalIPAsync_Completed);
                helper.QueryExternalIPAsync();
            }
            else
            {
                // External address is Dynamic hostname
                WAN_address = Settings.Default.DynamicDNSHostname;
                WAN_port    = Settings.Default.Port.ToString();
                Complete_Init();
            }
        }
예제 #2
0
        public void Init(bool _runTestPortServer)
        {
            SettingsProviderNet.SettingsProvider settingsRetreiver;

            var store = new SettingsProviderNet.Settings.TestStorage();
            settingsRetreiver = new SettingsProviderNet.SettingsProvider(store);

            var settings = settingsRetreiver.GetSettings<SettingsProviderNet.Settings.LiveTVSettings>();

            runTestPortServer = _runTestPortServer;

            // LAN
            Network.IPHelper helper = new Network.IPHelper();
            LAN_address = helper.GetLocalIP();
            LAN_port = Settings.Default.RPPort.ToString();
            EXTLAN_port = Settings.Default.RPPortWithLiveTV.ToString();
            WAN_port = LAN_port;

            if (! Settings.Default.DynamicDNSServiceUsed)
            {
                //  We need the external IP
                helper.QueryExternalIPAsync_Completed += new EventHandler<Network.IPHelper.GetExternalIPEventArgs>(helper_QueryExternalIPAsync_Completed);
                helper.QueryExternalIPAsync();
            }
            else
            {
                // External address is Dynamic hostname
                WAN_address = Settings.Default.DynamicDNSHostname;
                WAN_port = Settings.Default.RPPortWithLiveTV.ToString();
                Complete_Init();
            }
        }
예제 #3
0
        void FormConnectionWizard_Shown(object sender, EventArgs e)
        {
            ShowHideFromSettings();
            BindControls();
            SelectPages();

            var settings = settingsRetreiver.GetSettings <SettingsProviderNet.Settings.LiveTVSettings>();

            ((FormConnectionWizard)sender).RPPort.Value = settings.LiveTVPort;

            LiveTVinfo.Visible   = Settings.Default.UsingLiveTV;
            InternalPort.Visible = Settings.Default.UsingLiveTV;

            //LinkLabel.Link iOSLink = new LinkLabel.Link(77, 3);
            //LinkLabel.Link AndroidLink = new LinkLabel.Link(11, 4);
            //LinkLabel.Link WindowsLink = new LinkLabel.Link(93, 11);
            //LinkLabel.Link WindowsRTLink = new LinkLabel.Link(107, 2);
            //iOSLink.Name = "iOS";
            //AndroidLink.Name = "Android";
            //WindowsLink.Name = "Windows";
            //WindowsRTLink.Name = "WindowsRT";
            //linkLabel1.Links.Add(iOSLink);
            //linkLabel1.Links.Add(AndroidLink);
            //linkLabel1.Links.Add(WindowsLink);
            //linkLabel1.Links.Add(WindowsRTLink);

            // Password box
            SetPasswordBoxFromSettings();

            // Get local IP and external IP in background
            Network.IPHelper ipHelper = new Network.IPHelper();  // EVENT NOT REQUIRED ipHelper.QueryExternalIPAsync_Completed += new EventHandler<Network.IPHelper.GetExternalIPEventArgs>(ipHelper_QueryExternalIPAsync_Completed);
            LocalIP = ipHelper.GetLocalIP();
            ipHelper.QueryExternalIPAsync();
        }
        void FormConnectionWizard_Shown(object sender, EventArgs e)
        {
            ShowHideFromSettings();
            BindControls();
            SelectPages();

            // Password box
            SetPasswordBoxFromSettings();

            // Get local IP and external IP in background
            Network.IPHelper ipHelper = new Network.IPHelper();  // EVENT NOT REQUIRED ipHelper.QueryExternalIPAsync_Completed += new EventHandler<Network.IPHelper.GetExternalIPEventArgs>(ipHelper_QueryExternalIPAsync_Completed);
            LocalIP = ipHelper.GetLocalIP();
            ipHelper.QueryExternalIPAsync();
        }
예제 #5
0
        public void Init(bool _runTestPortServer)
        {
            runTestPortServer = _runTestPortServer;

            // LAN
            Network.IPHelper helper = new Network.IPHelper();
            LAN_address = helper.GetLocalIP();
            LAN_port = Settings.Default.Port.ToString();
            WAN_port = LAN_port;

            if (! Settings.Default.DynamicDNSServiceUsed)
            {
                //  We need the external IP
                helper.QueryExternalIPAsync_Completed += new EventHandler<Network.IPHelper.GetExternalIPEventArgs>(helper_QueryExternalIPAsync_Completed);
                helper.QueryExternalIPAsync();
            }
            else
            {
                // External address is Dynamic hostname
                WAN_address = Settings.Default.DynamicDNSHostname;
                WAN_port = Settings.Default.Port.ToString();
                Complete_Init();
            }
        }
예제 #6
0
        public void Init(bool _runTestPortServer)
        {
            SettingsProviderNet.SettingsProvider settingsRetreiver;

            var store = new SettingsProviderNet.Settings.TestStorage();

            settingsRetreiver = new SettingsProviderNet.SettingsProvider(store);

            var settings = settingsRetreiver.GetSettings <SettingsProviderNet.Settings.LiveTVSettings>();



            runTestPortServer = _runTestPortServer;

            // LAN
            Network.IPHelper helper = new Network.IPHelper();
            LAN_address = helper.GetLocalIP();
            LAN_port    = Settings.Default.RPPort.ToString();
            EXTLAN_port = Settings.Default.RPPortWithLiveTV.ToString();
            WAN_port    = LAN_port;


            if (!Settings.Default.DynamicDNSServiceUsed)
            {
                //  We need the external IP
                helper.QueryExternalIPAsync_Completed += new EventHandler <Network.IPHelper.GetExternalIPEventArgs>(helper_QueryExternalIPAsync_Completed);
                helper.QueryExternalIPAsync();
            }
            else
            {
                // External address is Dynamic hostname
                WAN_address = Settings.Default.DynamicDNSHostname;
                WAN_port    = Settings.Default.RPPortWithLiveTV.ToString();
                Complete_Init();
            }
        }
        void FormConnectionWizard_Shown(object sender, EventArgs e)
        {
            ShowHideFromSettings();
            BindControls();
            SelectPages();

            // Password box
            SetPasswordBoxFromSettings();

            // Get local IP and external IP in background
            Network.IPHelper ipHelper = new Network.IPHelper();  // EVENT NOT REQUIRED ipHelper.QueryExternalIPAsync_Completed += new EventHandler<Network.IPHelper.GetExternalIPEventArgs>(ipHelper_QueryExternalIPAsync_Completed);
            LocalIP = ipHelper.GetLocalIP();
            ipHelper.QueryExternalIPAsync();
        }