1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using InitializerModel;
- using PhihongEv.Lib;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- namespace ConfigEditor
- {
- /// <summary>
- /// NewModelNameDlg.xaml 的互動邏輯
- /// </summary>
- public partial class NewModelNameDlg : Window
- {
- public NewModelNameDlg()
- {
- InitializeComponent();
- }
- public string ModelName => uxModelName.Text;
- private void OK_Click(object sender, RoutedEventArgs e)
- {
- var enterdModelName = uxModelName.Text;
- if (!SystemID.TryLooseParse(enterdModelName, out _))
- {
- MessageBox.Show("model name error");
- return;
- }
- var folderPath = EvseSettingConfig.GetModelFolder(enterdModelName);
- if (Directory.Exists(folderPath))
- {
- MessageBox.Show("model folder exist");
- return;
- }
- DialogResult = true;
- this.Close();
- }
- }
- }
|