コード例 #1
0
 public void Setup()
 {
     if (File.Exists(".zuliprc"))
     {
         zclient        = ZulipServer.Login(".zuliprc");
         streamEndpoint = zclient.GetStreamEndPoint();
     }
 }
コード例 #2
0
        private async void btnGet_Click(object sender, System.EventArgs e)
        {
            await Program.GetZulipClient();

            streamEndPoint = streamEndPoint ?? Program.client.GetStreamEndPoint();
            try {
                var streams = await streamEndPoint.GetStreams();

                dgvStreams.DataSource = streams;
            } catch (System.Exception ex) {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #3
0
        private void InitControls()
        {
            msgEndPoint    = msgEndPoint ?? Program.client.GetMessageEndPoint();
            userEndPoint   = userEndPoint ?? Program.client.GetUserEndPoint();
            streamEndPoint = streamEndPoint ?? Program.client.GetStreamEndPoint();

            txtPrivateMsg.Text     = $"new private message sent via .NET client at {DateTime.Now}";
            txtStreamMsg.Text      = $"new stream message sent via .NET client at {DateTime.Now}";
            txtStreamTopic.Text    = "API Test";
            lblPMResponse.Text     = "";
            lblStreamResponse.Text = "";

            toolTip1.SetToolTip(this.numAnchor, "Is the message id from which you want to get x messages before and y messages after.\r\nIf you set Anchor really high (by default) it will automatically use the highest message id available; the most recent one.");
            toolTip1.SetToolTip(this.numBefore, "Number of messages to be retrieve before the anchor message.\r\nIf Anchor is beyond the most recent message, this will retrieve that number of messages.\r\nAfter will have no effect");
            toolTip1.SetToolTip(this.numAfter, "Only useful if you set Anchor to an actcual message id and then get messages after that point,\r\nie. going back to an old topic's first message, then using this to get messages after that.");
        }