private void NotificationMessageReceived(NotificationMessageEx message)
 {
     if (message.Notification == MsgDestination.WindowNewProject)
     {
         switch (message.Command)
         {
             case MsgCommand.Close:
               this.Close();
                 break;
         }
     }
 }
        private void NotificationMessageReceived(NotificationMessageEx message)
        {
            if (message.Notification == MsgDestination.WindowMain) // Csak akkor foglalkozunk az özenettel, ha nekünk szól
            {
                switch (message.Command)
                {
                    case MsgCommand.PopulateTreeView:
                        MenuTreeView.Items.Clear();
                        PopulateTreeView((List<VmIVRMenuElementBase>)message.Parameters[0], IVRMenuElementBase.RootIdentifier, null);
                        if (MenuTreeView.Items.Count > 0 && MenuTreeView.Items.GetItemAt(0) is TreeViewItem)
                        {
                            TreeViewItem root = (TreeViewItem)MenuTreeView.Items.GetItemAt(0);
                            root.IsExpanded = true;
                        }
                        break;
                    case MsgCommand.UpdateTreeDatas:
                        UpdateTreeDatas();
                        Debug.WriteLine(resList.ToString());
                        break;
                    case MsgCommand.DeleteSelectedItem:
                        if (MessageBox.Show("Are you sure you want to delete the selected menu?", "Delete menu", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                        {
                            DeleteSelectedItem((TreeViewItem)message.Parameters[0]);
                        }
                        break;
                    case MsgCommand.ShowSavedialog:
                        var dlg = new SaveFileDialog();
                        dlg.DefaultExt = ".ozivr";
                        dlg.Title = "Save Ozeki IVR Studio project";
                        dlg.FileName = (string) message.Parameters[1];
                        dlg.Filter = "Ozeki IVR Studio project file (.ozivr)|*.ozivr";
                        if (dlg.ShowDialog() == true)
                        {
                            ((FileOperationMessage)message.Parameters[0]).Callback(dlg.FileName);
                        }
                        break;
                    case MsgCommand.ShowLoadDialog:
                        var opendlg= new OpenFileDialog();
                        opendlg.DefaultExt = ".ozivr";
                        opendlg.Title = "Open an Ozeki IVR Studion project";
                        opendlg.Filter = "Ozeki IVR Studio project file (.ozivr)|*.ozivr";
                        if (opendlg.ShowDialog() == true)
                        {
                            ((FileOperationMessage)message.Parameters[0]).Callback(opendlg.FileName);
                        }
                        break;
                        case MsgCommand.ShowSaveQuestion:
                          DialogMessageEx dialogMessageEx = (DialogMessageEx)message.Parameters[0];

                        var result = MessageBox.Show(dialogMessageEx.Content, dialogMessageEx.Caption, MessageBoxButton.YesNo, MessageBoxImage.Question);
                        dialogMessageEx.Callback.Invoke(result);
                        break;
                        case MsgCommand.ShowWindowNewProject:
                        WindowNewProject wndNewProject=new WindowNewProject();
                        wndNewProject.Owner = this;
                        wndNewProject.ShowDialog();
                        break;
                        case MsgCommand.UpdateProject:
                        ((VmMain)this.DataContext).CurrentProject = (VmIVRProject)message.Parameters[0];
                        break;
                }
            }
        }