Example #1
0
        public Form1()
        {
            InitializeComponent();

            string path = MyIni.ReadIniData("Common", "path", "-1");

            lab_path.Text = path;
        }
Example #2
0
        public MyData(string Name)
        {
            this.Name = Name;
            string sPrePath = MyIni.ReadIniData("Path", "DataInfoOffice", "");
            //string sPrePath = @"../../../data/";
            string Path = sPrePath + Name + ".csv";

            FullName = Path;
            //RedFile(Path);
            RedFilePreFour(Path);
            //FileInfo fi = new FileInfo(Path);
        }
Example #3
0
        private void btn_ChangePath_Click(object sender, EventArgs e)
        {
            //OpenFileDialog dialog = new OpenFileDialog();
            FolderBrowserDialog dialog = new FolderBrowserDialog();

            //dialog.Multiselect = true;//该值确定是否可以选择多个文件
            dialog.Description = "请选择文件夹";
            if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string file = dialog.SelectedPath;
                lab_path.Text = file;
                MyIni.WriteIniData("Common", "path", file);
            }
        }
Example #4
0
        private void btn_Create_Click(object sender, EventArgs e)
        {
            string path = MyIni.ReadIniData("Common", "path", "-1");

            if (path.Equals("-1"))
            {
                return;
            }
            //lua
            string luaNamePre = MyIni.ReadIniData("TaskType", TaskType, "1");
            string fullName   = path + "\\..\\lua\\[" + luaNamePre + "]" + TaskNameLua + ".lua";

            File.WriteAllText(fullName, "", Encoding.UTF8);
            //csv

            string csvFullName = luaNamePre + "\\++TaskInfo.csv";

            MessageBox.Show("成功");
        }