Example #1
0
        public MainForm()
        {
            InitializeComponent();
            id = DataFile.GetImportantData();
            if (id != null)
            {
                if (id.EXin.UserName != null)
                {
                    this.idTextBox.Text = id.EXin.UserName;
                }
                if (id.EXin.PassWord != null)
                {
                    this.pwdTextBox.Text = id.EXin.PassWord;

                    eXinSaved = true;
                    this.saveCheckBox.Checked = true;
                }


                if (id.Router.UserName != null)
                {
                    this.id2TextBox.Text = id.Router.UserName;
                }

                if (id.Router.PassWord != null)
                {
                    this.pwd2TextBox.Text      = id.Router.PassWord;
                    routerSaved                = true;
                    this.save2CheckBox.Checked = true;
                }
                this.RouterModelComboBox.Items.Add((Object)("WR703N 3.17.1"));
                this.RouterModelComboBox.Items.Add((Object)("WR740N 5.1.3"));
                this.RouterModelComboBox.SelectedIndex = 1;
                if (PPPoE.IsEXinInActive())
                {
                    this.ConnectButton.Text = "断开";
                    this.statusLabel.Text   = "E信已连接";
                    connected = true;
                    if (!uc.HaveBeenChecked)
                    {
                        uc.CheckUpdate();
                    }
                }
            }
        }
 private async void HandleCheckForUpdateButtonClick(object sender, RoutedEventArgs e)
 {
     await UpdateCheck.CheckUpdate((status, message) => UpdateMessage.Content = message);
 }