private void btnCreate_Click(object sender, EventArgs e)
        {
            try
            {
                byte[] imageArray = null;
                try
                {
                    imageArray = getImageByteArray();
                }
                catch (Exception)
                {
                    MessageBox.Show(Language.GetLocalizedText(-1, "Error with selected image"));
                    return;
                }
                CloudCommunitiesUsersAPI.apiUsers uApi = new CloudCommunitiesUsersAPI.apiUsers();
                string logoUrl = uApi.UploadFile(CloudCommunities.GetTokenFromId(), imageArray, txtImage.Text, "image/jpeg", false);

                apiCommunities api = new apiCommunities();
                long newCommunityId = api.Create(CloudCommunities.GetTokenFromId(), txtName.Text, logoUrl,
                    (OrderContentMethods)cmbOrder.SelectedItem, (PublicPermission)cmbAccess.SelectedItem, txtDescription.Text);
                createdCommunityId = newCommunityId;
                this.Close();
            }
            catch (SoapException ex)
            {
                CloudCommunities.ProcessSoapException(ex);
            }
        }
        private void btnCreate_Click(object sender, EventArgs e)
        {
            try
            {
                byte[] imageArray = null;
                try
                {
                    imageArray = getImageByteArray();
                }
                catch (Exception)
                {
                    MessageBox.Show(Language.GetLocalizedText(-1, "Error with selected image"));
                    return;
                }
                CloudCommunitiesUsersAPI.apiUsers uApi = new CloudCommunitiesUsersAPI.apiUsers();
                string logoUrl = uApi.UploadFile(CloudCommunities.GetTokenFromId(), imageArray, txtImage.Text, "image/jpeg", false);

                apiCommunities api            = new apiCommunities();
                long           newCommunityId = api.Create(CloudCommunities.GetTokenFromId(), txtName.Text, logoUrl,
                                                           (OrderContentMethods)cmbOrder.SelectedItem, (PublicPermission)cmbAccess.SelectedItem, txtDescription.Text);
                createdCommunityId = newCommunityId;
                this.Close();
            }
            catch (SoapException ex)
            {
                CloudCommunities.ProcessSoapException(ex);
            }
        }