private void button1_Click(object sender, RoutedEventArgs e) { var newForm = new AddingItemsPage(); newForm.Show(); this.Close(); }
private void AddingItemsBtn_Click(object sender, RoutedEventArgs e) { try { if (factory == null) { factory = new ChannelFactory <IContractWeb>(binding, new EndpointAddress(address)); channel = factory.CreateChannel(); } if (factory != null && channel != null) { var newForm = new AddingItemsPage(); newForm.Show(); this.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }