예제 #1
0
        private void cmbCate_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbCate.SelectedItem != null && cmbCate.SelectedItem.ToString() != Tips)
            {
                //保存最后使用项
                var config = ConfigHelper.GetConfig <AppConfig>();
                config.LastCate = cmbCate.SelectedItem.ToString();
                ConfigHelper.UpdateConfig(config);

                listFiles.Items.Clear();
                var files = FormTemplateService.GetFiles(Path.Combine(FormTemplateService.TemplateDir,
                                                                      cmbCate.SelectedItem.ToString()));
                foreach (var file in files)
                {
                    listFiles.Items.Add(new FileInfo(file).Name);
                }
            }
        }