Ejemplo n.º 1
0
        public Session()
        {
            InitializeComponent();
            DataContext = ViewModel = new SessionViewModel(this);

            RecentFileList.UseXmlPersister();
            RecentFileList.MaxNumberOfFiles        = 5;
            RecentFileList.MenuItemFormatOneToNine = "_{0}:  {1}";
            RecentFileList.MenuItemFormatTenPlus   = "{0}:  {1}";
            RecentFileList.MenuClick += (s, e) => {
                if (!Confirm("Seesion is changed and not saved yet.\nAre you sure to continue?", "Load", true))
                {
                    return;
                }

                ViewModel.EnqueueLoadSessionRequest(e.Filepath, false);
            };
        }