Example #1
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();
            }
        }
Example #2
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();
            }
        }
Example #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();
        }
Example #4
0
        void tmCheckDNS_Tick(object userInfo)
        {
            if (Settings.Default.DebugAdvanced)
            {
                Functions.WriteLineToLogFile("DNSHelper: Checking for external IP address change...");
            }

            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();
        }
        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();
            }
        }
Example #7
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();
            }
        }
Example #8
0
        private void Form1InitSettings()
        {
            // Upgrade?
            if (Settings.Default.SettingsUpgradeRequired)
            {
                Settings.Default.Upgrade();
                Settings.Default.SettingsUpgradeRequired = false;
            }

            // Always save settings immediately
            Settings.Default.PropertyChanged += new PropertyChangedEventHandler(Default_PropertyChanged);

            // SETTINGS - DEFAULTS
            if (!Settings.Default.HaveDoneVanillaSetup)
                VanillaSetup();

            // User Agents
            if (Settings.Default.RecentUserAgents == null) Settings.Default.RecentUserAgents = new System.Collections.Specialized.StringCollection();
            if (Settings.Default.MobileUserAgents == null) Settings.Default.MobileUserAgents = new System.Collections.Specialized.StringCollection();

            // Get external IP in background
            Network.IPHelper ipHelper = new Network.IPHelper();  // EVENT NOT REQUIRED ipHelper.QueryExternalIPAsync_Completed += new EventHandler<Network.IPHelper.GetExternalIPEventArgs>(ipHelper_QueryExternalIPAsync_Completed);
            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();
        }
Example #10
0
        private void Form1InitSettings()
        {
            // Upgrade?
            if (Settings.Default.SettingsUpgradeRequired)
            {
                Settings.Default.Upgrade();
                Settings.Default.SettingsUpgradeRequired = false;
            }

            // Always save settings immediately
            Settings.Default.PropertyChanged += new PropertyChangedEventHandler(Default_PropertyChanged);

            // SETTINGS - DEFAULTS
            if (!Settings.Default.HaveDoneVanillaSetup)
                VanillaSetup();

            // User Agents
            if (Settings.Default.RecentUserAgents == null) Settings.Default.RecentUserAgents = new System.Collections.Specialized.StringCollection();
            if (Settings.Default.MobileUserAgents == null) Settings.Default.MobileUserAgents = new System.Collections.Specialized.StringCollection();

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

            if (Environment.OSVersion.Version < new Version(6, 1))
            {
                // LEGACY ***  (XP and Vista)
                this.cbEnableLiveTV2.Checked = false;
                this.cbEnableLiveTV2.Enabled = false;
                cbEnableLiveTV_CheckedChanged_1(this.cbEnableLiveTV2, null);
            }
        }