06-系统操作/音乐风景壁纸/MusicViewDesk/Form2.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MusicViewDesk
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }
        string path;
        private void Form2_Load(object sender, EventArgs e)
        {
            comboBox1.SelectedIndex = 0;
            string[] scrs = System.IO.Directory.GetFiles(Environment.SystemDirectory.ToString(),"*.scr");
            comboBox2.Items.AddRange(scrs);
            comboBox2.SelectedIndex = 0;

            path = Application.StartupPath.ToString();
            path = path.Substring(0, path.LastIndexOf("\\"));
            path = path.Substring(0, path.LastIndexOf("\\"));
            path += @"\Setup.ini";

            txtMusicPath.Text = baseClass.IniReadValue("setup", "musicpath", path);
            txtPath.Text = baseClass.IniReadValue("setup", "picpath", path);
            comboBox1.Text = baseClass.IniReadValue("setup", "pictime", path);
            comboBox2.Text = baseClass.IniReadValue("setup", "screen", path);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void comboBox1_TextChanged(object sender, EventArgs e)
        {
            if (comboBox1.Text.Trim().Length > 2)
            {
                if (comboBox1.Text.Trim().Substring(0, 1) == "0")
                {
                    comboBox1.Text = comboBox1.Text.Trim().Substring(1);
                }
            }
        }

        private void comboBox1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (!(e.KeyChar <= '9' && e.KeyChar >= '0') && e.KeyChar != '\r' && e.KeyChar != '\b')
            {
                e.Handled = true;
            }
        }

后面还有 46 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。