Little Startup Manager/EditRunItem.cs

(开头部分) 2KB

这里只显示每个文件的开头 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;
using System.IO;
using Microsoft.Win32;
using Little_Registry_Cleaner;
// 下载于www.51aspx.com
namespace Little_Startup_Manager
{
    public partial class EditRunItem : Form
    {
        private string strItem;
        private string strSection;

        public EditRunItem(string item, string section, string path, string args)
        {
            InitializeComponent();

            strItem = item;
            strSection = section;

            this.Text = "Edit - " + strItem;

            this.textBoxFile.Text = path;
            this.textBoxArgs.Text = args;
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            if (!Utils.FileExists(this.textBoxFile.Text))
            {
                MessageBox.Show(this, Properties.Resources.smCannotFindFile, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            if (strSection.StartsWith("HKEY"))
            {
                string strPath = "";

                if (!string.IsNullOrEmpty(this.textBoxFile.Text) && !string.IsNullOrEmpty(this.textBoxArgs.Text))
                    strPath = string.Format("\"{0}\" {1}", this.textBoxFile.Text, this.textBoxArgs.Text);
                else
                    strPath = string.Format("\"{0}\"", this.textBoxFile.Text);

                string strMainKey = strSection.Substring(0, strSection.IndexOf('\\'));
                string strSubKey = strSection.Substring(strSection.IndexOf('\\') + 1);

                RegistryKey rk = Utils.RegOpenKey(strMainKey, strSubKey);

                if (rk != null)
                {
                    rk.SetValue(strItem, strPath);
                    rk.Close();
                }
后面还有 23 行代码,购买后查看完整代码

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

AI 解读 AI

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

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