Ejemplo n.º 1
0
 public static void ShowWindow(FormType formType, ServerMessageViewModel data)
 {
     ContainerWindow.ShowWindow(new ContainerWindowViewModel {
         Title           = "服务器消息",
         IsMaskTheParent = true,
         Width           = 540,
         FormType        = formType,
         CloseVisible    = System.Windows.Visibility.Visible
     }, ucFactory: (window) =>
     {
         ServerMessageViewModel vm = new ServerMessageViewModel(data);
         window.AddCloseWindowOnecePath(vm.Id);
         return(new ServerMessageEdit(vm));
     }, fixedSize: true);
 }
Ejemplo n.º 2
0
 public static void ShowWindow(FormType formType, ServerMessageViewModel data)
 {
     ContainerWindow.ShowWindow(new ContainerWindowViewModel {
         Title          = "服务器消息",
         IsDialogWindow = true,
         Width          = 540,
         FormType       = formType,
         CloseVisible   = System.Windows.Visibility.Visible
     }, ucFactory: (window) =>
     {
         ServerMessageViewModel vm = new ServerMessageViewModel(data)
         {
             CloseWindow = () => window.Close()
         };
         return(new ServerMessageEdit(vm));
     }, fixedSize: true);
 }
Ejemplo n.º 3
0
 public static void ShowWindow(FormType formType, ServerMessageViewModel data)
 {
     ContainerWindow.ShowWindow(new ContainerWindowViewModel {
         Title           = "服务器消息",
         IsMaskTheParent = true,
         Width           = 540,
         FormType        = formType,
         CloseVisible    = System.Windows.Visibility.Visible
     }, ucFactory: (window) =>
     {
         ServerMessageViewModel vm = new ServerMessageViewModel(data);
         window.AddOnecePath <CloseWindowCommand>("处理关闭窗口命令", LogEnum.DevConsole, action: message => {
             window.Close();
         }, pathId: vm.Id, location: typeof(ServerMessageEdit));
         return(new ServerMessageEdit(vm));
     }, fixedSize: true);
 }
Ejemplo n.º 4
0
 public ServerMessageEditCommand(FormType formType, ServerMessageViewModel source)
 {
     this.FormType = formType;
     this.Source   = source;
 }
Ejemplo n.º 5
0
 public ServerMessageEdit(ServerMessageViewModel vm)
 {
     this.DataContext = vm;
     InitializeComponent();
 }