Пример #1
0
        public RadioChooserData(FlexRadioList radList, SmartLinkSettings slset, string title)
        {
            this._radiolist = radList;
            this._radiolist.PropertyChanged += this._radioList_PropertyChanged;
            this._slSettings = slset;
            this.InitStartupScreens();

            this.WindowTitle = title + " Radio Chooser";
            this.AppIconPath = "resources/radiochoosericon.ico";

            SmartLinkSettings wanset = this._slSettings;

            wanset.SaveAccountAction = (EventHandler)Delegate.Combine(wanset.SaveAccountAction, new EventHandler(delegate(object o, EventArgs e)
            {
                this.ShowScreen(this.RadioChooserScreen);
            }));
            this.FilterFileExists = File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\FlexRadio Systems\\filter.txt");
        }
Пример #2
0
        private void _radioList_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            FlexRadioList radioListViewModel = sender as FlexRadioList;

            if (radioListViewModel == null)
            {
                return;
            }
            if (radioListViewModel != this._radiolist)
            {
                return;
            }
            string propertyName = e.PropertyName;

            if (propertyName == "SelectedRadio" && this._radiolist.SelectedRadio == null && this.WanSettingsScreen.IsVisible)
            {
                this.ShowScreen(this.RadioChooserScreen);
            }
        }
Пример #3
0
        public SmartLinkSettings(WanServer wanServer, FlexRadioList radioListVm)
        {
            string domain   = "frtest.auth0.com";
            string clientId = "4Y9fEIIsVYyQo5u6jr7yBWc4lV5ugC2m";

            Auth0LVM = new Auth0Model(new Auth0Client(domain, clientId, 900, 630, false));
            this._auth0LVM.PropertyChanged += this._auth0LVM_PropertyChanged;

            this._wanServer = wanServer;
            this._wanServer.PropertyChanged += this._wanServer_PropertyChanged;
            this._wanServer.WanApplicationRegistrationInvalid += this._wanServer_WanApplicationRegistrationInvalid;

            this.RadioList = radioListVm;
            Task.Factory.StartNew(delegate
            {
                this._auth0LVM.LoginWithRefreshTokenNoUI();
            }, TaskCreationOptions.LongRunning);

            Task.Factory.StartNew(delegate
            {
                this.WanServerConnectThread();
            }, TaskCreationOptions.LongRunning);
        }
Пример #4
0
 public SmartLinkWan()
 {
     RadioList = new FlexRadioList();
     wanServer = new WanServer();
 }