コード例 #1
0
 public void Restart(string endpoint)
 {
     var mainWindow = new MainWindow();
     mainWindow.Connect(new EndpointAddress(endpoint));
     mainWindow.ClosedEvent += OnClosed;
     mainWindow.Update += OnUpdate;
     mainWindow.Show();
 }
コード例 #2
0
        public void Main()
        {
            this.InitializeLifetimeService();

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

            mainWindow.Show();
        }
コード例 #3
0
 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));
 }