Beispiel #1
0
        private void Follow_Users(object sender, EventArgs e)
        {
            TJSONArray users = new TJSONArray();

            if (listBox1.SelectedItems.Count != 0)
            {
                for (int i = 0; i < listBox1.SelectedItems.Count; i++)
                {
                    int sindex = listBox1.Items.IndexOf(listBox1.SelectedItems[i]);
                    if (sindex > -1)
                    {
                        if (CTConnection.getCurUserID() != UsersArray[sindex].UserID)
                        {
                            users.add(new TJSONString(UsersArray[sindex].UserID));
                        }
                        //users.add(new TJSONString(listBox1.SelectedItems[i].ToString()));
                    }
                }
                CTConnection.getLoginUserInstance().SetUsersToFollow(users, () =>
                {
                    this.Dispatcher.BeginInvoke(() => { this.NavigationService.Navigate(new Uri("/MainTweetPage.xaml", UriKind.Relative)); });
                });
            }
            else
            {
                this.Dispatcher.BeginInvoke(() => { this.NavigationService.Navigate(new Uri("/MainTweetPage.xaml", UriKind.Relative)); });
            }
        }
        private void Follow_Users(object sender, EventArgs e)
        {
            TJSONArray users = new TJSONArray();

            if (listBox1.SelectedItems.Count != 0)
            {
                for (int i = 0; i < listBox1.SelectedItems.Count; i++)
                {
                    users.add(new TJSONString(listBox1.SelectedItems[i].ToString()));
                }
                CTConnection.getCompanyTweet().SetUsersToFollow(users, () =>
                {
                    this.Dispatcher.BeginInvoke(() => { this.NavigationService.Navigate(new Uri("/MainTweetPage.xaml", UriKind.Relative)); });
                });
            }
            else
            {
                this.Dispatcher.BeginInvoke(() => { this.NavigationService.Navigate(new Uri("/MainTweetPage.xaml", UriKind.Relative)); });
            }
        }
Beispiel #3
0
        /**
         * JSON representation of a TParam
         *
         * @return a JArray that represents a TParam
         */
        public TJSONArray tojson()
        {
            TJSONArray arr = new TJSONArray();

            arr.add(new TJSONString(getName()));
            arr.add(new TJSONNumber(getDataType()));
            arr.add(new TJSONNumber(getOrdinal()));
            arr.add(new TJSONNumber(getSubType()));
            arr.add(new TJSONNumber(getScale()));
            arr.add(new TJSONNumber(getSize()));
            arr.add(new TJSONNumber(getPrecision()));
            arr.add(new TJSONNumber(getChildPosition()));
            if (getNullable())
            {
                arr.add(new TJSONTrue());
            }
            else
            {
                arr.add(new TJSONFalse());
            }
            if (getHidden())
            {
                arr.add(new TJSONTrue());
            }
            else
            {
                arr.add(new TJSONFalse());
            }
            arr.add(new TJSONNumber(getParameterDirection()));
            if (getValueParameter())
            {
                arr.add(new TJSONTrue());
            }
            else
            {
                arr.add(new TJSONFalse());
            }
            if (getLiteral())
            {
                arr.add(new TJSONTrue());
            }
            else
            {
                arr.add(new TJSONFalse());
            }
            return(arr);
        }
Beispiel #4
0
 /**
  * JSON representation of a TParam
  *
  * @return a JArray that represents a TParam
  */
 public TJSONArray tojson()
 {
     TJSONArray arr = new TJSONArray();
     arr.add(new TJSONString(getName()));
     arr.add(new TJSONNumber(getDataType()));
     arr.add(new TJSONNumber(getOrdinal()));
     arr.add(new TJSONNumber(getSubType()));
     arr.add(new TJSONNumber(getScale()));
     arr.add(new TJSONNumber(getSize()));
     arr.add(new TJSONNumber(getPrecision()));
     arr.add(new TJSONNumber(getChildPosition()));
     if (getNullable()) arr.add(new TJSONTrue());
     else arr.add(new TJSONFalse());
     if (getHidden()) arr.add(new TJSONTrue());
     else arr.add(new TJSONFalse());
     arr.add(new TJSONNumber(getParameterDirection()));
     if (getValueParameter()) arr.add(new TJSONTrue());
     else arr.add(new TJSONFalse());
     if (getLiteral()) arr.add(new TJSONTrue());
     else arr.add(new TJSONFalse());
     return arr;
 }