コード例 #1
0
        private void OnChangeServerLocation(object sender, TextChangedEventArgs e)
        {
            laucherSettings.SetServerLocation(ServerLocation.Text);

            string check_server_file = laucherSettings.GetServerLocation() + @"\" + laucherSettings.GetServerFilename() + ".exe";

            LoadAllSettings();
            if (!File.Exists(check_server_file))
            {
                ErrorHandler.AddError(ErrorType.error_Server_noLocation);
            }
            else
            {
                if (!ErrorHandler.isError(102))
                {
                    if (laucherSettings.GetClientLocation() != serverSettings.GetClientLocation())
                    {
                        serverSettings.SetClientLocation(laucherSettings.GetClientLocation());
                    }
                }

                ErrorHandler.RemoveError(ErrorType.error_Server_noLocation);
            }
            DisplayErrors();
            LoadAllSettings();
        }
コード例 #2
0
        private void OnChangeServerLocation(object sender, TextChangedEventArgs e)
        {
            laucherSettings.SetServerLocation(ServerLocation.Text);
            string check_server_file = laucherSettings.GetServerLocation() + @"\" + laucherSettings.GetServerFilename() + ".exe";

            if (!File.Exists(check_server_file))
            {
                ErrorHandler.AddError(112, "Cannot find server at this location.");
            }
            else
            {
                ErrorHandler.RemoveError(112, "Cannot find server at this location.");
            }
            DisplayErrors();
        }
コード例 #3
0
 private void OnChangeServerLocation(object sender, TextChangedEventArgs e)
 {
     laucherSettings.SetServerLocation(ServerLocation.Text);
 }