Пример #1
0
 /// <summary>
 /// Will open a form that will ask for connection details (with option for default props) and attempt to ping target to see if it is possible to establish connection
 /// </summary>
 /// <param name="parent">Parent form that this form will be opened on</param>
 /// <param name="default_details">The default connection details to be inserted</param>
 /// <param name="forceTesting"></param>
 public static ConnectionDetails GetDetails(Form parent, ConnectionDetails default_details, bool forceTesting = true) {
     UserConnectionDetailsRequester getter = null;
     parent.Invoke(() => {
                       getter = new UserConnectionDetailsRequester(forceTesting, default_details);
                       getter.ShowDialog(parent);
                   });
     return getter.Results();
 }
Пример #2
0
        /// <summary>
        /// Will open a form that will ask for connection details (with option for default props) and attempt to ping target to see if it is possible to establish connection
        /// </summary>
        /// <param name="parent">Parent form that this form will be opened on</param>
        /// <param name="default_details">The default connection details to be inserted</param>
        /// <param name="forceTesting"></param>
        public static ConnectionDetails GetDetails(Form parent, ConnectionDetails default_details, bool forceTesting = true)
        {
            UserConnectionDetailsRequester getter = null;

            parent.Invoke(() => {
                getter = new UserConnectionDetailsRequester(forceTesting, default_details);
                getter.ShowDialog(parent);
            });
            return(getter.Results());
        }