Example #1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var newForm = new AddingItemsPage();

            newForm.Show();
            this.Close();
        }
Example #2
0
 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);
     }
 }