Exemplo n.º 1
0
 public void Restart(string endpoint)
 {
     var mainWindow = new MainWindow();
     mainWindow.Connect(new EndpointAddress(endpoint));
     mainWindow.ClosedEvent += OnClosed;
     mainWindow.Update += OnUpdate;
     mainWindow.Show();
 }
Exemplo n.º 2
0
        public void Main()
        {
            this.InitializeLifetimeService();

            var mainWindow = new MainWindow();
            mainWindow.ClosedEvent += OnClosed;
            mainWindow.Update += OnUpdate;

            mainWindow.Show();
        }
 private void OpenClient()
 {
     var mainWindow = new MainWindow();
     mainWindow.Connect(servicesAddressList[0]);
     mainWindow.Show();
     mainWindow.WindowState = WindowState.Maximized;
     mainWindow.Update += (sender, e) =>
         {
             if (Update != null)
                 Update(sender, e);
         };
     mainWindow.Activate();
     mainWindow.ClosedEvent += (sender, e) => Dispatcher.Invoke(new Action(FindAndConnect));
 }