Пример #1
0
        void VerifyAndConnect(IServerInterface I)
        {
            try
            {
                var res = I.ConnectionStatus(out string error);
                if (!res.HasFlag(ConnectivityLevel.Connected))
                {
                    MessageBox.Show("Unable to connect to service! Error: " + error);
                    return;
                }
                if (!res.HasFlag(ConnectivityLevel.Authenticated))
                {
                    MessageBox.Show("Authentication error: Username/password/windows identity is not authorized! Ensure you are a system administrator or in the correct Windows group on the service machine.");
                    return;
                }

                new InstanceSelector(I).Show();
                Close();
            }
            catch
            {
                I.Dispose();
                throw;
            }
        }
Пример #2
0
 /// <summary>
 /// Called from <see cref="Dispose(bool)"/>
 /// </summary>
 void Cleanup()
 {
     InstancesInUse.Remove(Interface.InstanceName);
     Interface.Dispose();
 }
Пример #3
0
 /// <summary>
 /// Called by <see cref="Dispose(bool)"/>
 /// </summary>
 void Cleanup()
 {
     masterInterface.Dispose();
 }