private async void NetworkInformation_NetworkStatusChanged(object sender) { await OOBENetworkPageDispatcher.RunAsync(CoreDispatcherPriority.Low, async() => { await NetworkGrid.SetupNetworkAsync(); }); }
public OOBENetwork() { this.InitializeComponent(); OOBENetworkPageDispatcher = Window.Current.Dispatcher; NetworkInformation.NetworkStatusChanged += NetworkInformation_NetworkStatusChanged; NetworkGrid.NetworkConnected += NetworkGrid_NetworkConnected; this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled; this.DataContext = LanguageManager.GetInstance(); this.Loaded += async(sender, e) => { await OOBENetworkPageDispatcher.RunAsync(CoreDispatcherPriority.Low, async() => { await NetworkGrid.SetupNetworkAsync(); }); }; }
private void NetworkGrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex != 0 && e.ColumnIndex != 1 && e.ColumnIndex != -1 && e.RowIndex != -1 && !editNetworkFlag) { row = e.RowIndex; if (Encrypted == true) { oldpass = Decrypt(NetworkGrid.Rows[e.RowIndex].Cells[4].Value.ToString()); Encrypted = false; } else { oldpass = NetworkGrid.Rows[e.RowIndex].Cells[4].Value.ToString(); } oldip = NetworkGrid.Rows[e.RowIndex].Cells[2].Value.ToString(); olduser = NetworkGrid.Rows[e.RowIndex].Cells[3].Value.ToString(); oldPassword = Decrypt(NetworkGrid.Rows[e.RowIndex].Cells[4].Value.ToString()); oldname = NetworkGrid.Rows[e.RowIndex].Cells[5].Value.ToString(); NetworkGrid.Rows[e.RowIndex].Cells[4].Value = oldpass; NetworkGrid.BeginEdit(true); editNetworkFlag = true; Console.WriteLine(editNetworkFlag); } }