public static EnterNameViewModel CreateEnterNamespace() { var model = new EnterNameViewModel { Description = "Пространство имен", DisplayName = "Введите пространство имен" }; return model; }
public static EnterNameViewModel CreateEnterNamespace() { var model = new EnterNameViewModel { Description = "Пространство имен", DisplayName = "Введите пространство имен" }; return(model); }
/// <summary> /// Получить код страницы /// </summary> /// <param name="parametr"></param> public void GetPage(string parametr) { if (!EnterResourcePath()) { return; } PageConstructotHelper helper = new PageConstructotHelper(); helper.ResourceNamespace = ResourceNameSpace; switch (parametr) { case "e": helper.Construct(Properties, true); Clipboard.SetText(helper.ToString()); _aggregator.PublishOnUIThread("[Инфо]:Скопированно в буфер"); return; case "v": helper.Construct(Properties, true); Clipboard.SetText(helper.ToString()); _aggregator.PublishOnUIThread("[Инфо]:Скопированно в буфер"); return; case "ef": helper.Construct(Properties, true); helper.FullPage = true; if (_diskPath.GetPath("EditPage")) { string file = _diskPath.Path; string csfile = file + ".cs"; string designerfile = file + ".designer.cs"; File.WriteAllText(file, helper.ToString()); File.WriteAllText(csfile, helper.GetCodebehind(true)); File.WriteAllText(designerfile, ""); _aggregator.PublishOnUIThread("[Инфо]:Записан файл"); } return; case "vf": if (_diskPath.GetPath("EditPage")) { EnterNameViewModel model = EnterNameViewModel.CreateEnterNamespace(); //ModalView window = new ModalView { DataContext = model }; if (_windowManager.ShowDialog(model) == true && model.IsValid) { helper.ClassName = model.Value; helper.FullPage = true; helper.Construct(Properties, false); string file = _diskPath.Path; string csfile = file + ".cs"; string designerfile = file + ".designer.cs"; File.WriteAllText(file, helper.ToString()); File.WriteAllText(csfile, helper.GetCodebehind(false)); File.WriteAllText(designerfile, ""); _aggregator.PublishOnUIThread("[Инфо]:Записан файл"); } } return; } }