CodeGenerator/CloudBuilder.CodeGenerator/TemplateUserControl.cs
owenchen 5959bae57b ow
2026-05-12 10:32:46 +08:00

38 lines
1.0 KiB
C#

using CloudBuilder.Core.DependencyInjection.Form;
using Microsoft.AspNetCore.Routing.Template;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CloudBuilder.CodeGenerator
{
public partial class TemplateUserControl : UserControl, IUserControl
{
public TemplateUserControl()
{
InitializeComponent();
}
private void templatePathBut_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog();
if (DialogResult.OK == ofd.ShowDialog())
{
templatePathTxt.Text = ofd.FileName;
contextTxt.Text = File.ReadAllText(ofd.FileName);
}
}
private void saveFileBut_Click(object sender, EventArgs e)
{
File.WriteAllText(templatePathTxt.Text, contextTxt.Text);
}
}
}