コード例 #1
0
        private void showCallPanel(bool p)
        {
            if (p)
            {
                btnLogin.Visible  = false;
                callPanel.Visible = true;

                // Expire olan token refreshlenince tetiklenecek method
                Authentication.Token.RefreshCallback += TokensRefreshed;
                List <Announcement> announcements = BulutfonApi.GetAnnouncements(Authentication.Token);
                announcementCombo.DataSource    = announcements;
                announcementCombo.DisplayMember = "name";
                announcementCombo.ValueMember   = "id";

                List <Did> dids = BulutfonApi.GetDids(Authentication.Token);

                didCombo.DataSource    = dids;
                didCombo.DisplayMember = "number";
                didCombo.ValueMember   = "number";
            }
            else
            {
                MessageBox.Show("Bir Hata Oluştu!");
            }
        }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            // With Master Token
            button1.Enabled = false;
            button2.Enabled = false;
            Token token = new Token("MASTER TOKEN", "");

            dataGridView1.DataSource = BulutfonApi.GetDids(token);
        }
コード例 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            // With OAUTH 2
            string client_id     = "CLIENT_ID";
            string client_secret = "CLIENT_SECRET";
            var    loggedIn      = LoginForm.Login(
                client_id,
                client_secret,
                this);

            if (loggedIn)
            {
                button1.Enabled          = false;
                button2.Enabled          = false;
                dataGridView1.DataSource = BulutfonApi.GetDids(Authentication.Token);
            }
        }
コード例 #4
0
        public ActionResult Dids()
        {
            var dids = BulutfonApi.GetDids((Token)Session[Token.Key]);

            return(View(dids));
        }