settingsform.cs

来自「how to use RSS services on windows mobil」· CS 代码 · 共 64 行

CS
64
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace LiveQnA4
{
    public partial class SettingsForm : Form
    {
        private static int refreshTime = 60;
        private static string userID = "01234567890123456789012345678901";   // This is a fake User Id
        // Take a look at the MainForm.cs source file for links on how to obtain your own Live QnA User Id.

        public SettingsForm()
        {
            InitializeComponent();
        }

        public static int RefreshTime
        {
            get
            {
                return refreshTime;
            }
        }

        public static string UserID
        {
            get
            {
                return userID;
            }
        }

        private void SettingsForm_Load(object sender, EventArgs e)
        {
            textBox1.Text = userID;
            textBox2.Text = refreshTime.ToString();
        }

        private void SettingsForm_Closing(object sender, CancelEventArgs e)
        {
            if (this.DialogResult == DialogResult.OK)
            {
                refreshTime = Convert.ToInt32(textBox2.Text);
            }
        }

        private void menuItemCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void menuItemOK_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?