static void Main(string[] args)
        {
            View view = new View();

            view.ReadViewStrategy();
            View_Model operation = new View_Model(view);
        }
示例#2
0
        public ConfigWindow(View_Model vm)
        {
            InitializeComponent();                     // loading window
            this.vm = vm;
            vm.LoadConfig();                           // actualize config content

            Prog = vm.Programs ?? new List <string>(); //importing lists sources
            Ext  = vm.Extensions ?? new List <string>();

            lb_P.ItemsSource = Prog; //Lists sources
            lb_E.ItemsSource = Ext;
        }
示例#3
0
        /// <summary>
        /// Maken van het spel
        /// </summary>
        public Board(Grid viewGrid, View_Model.BoardView_Model newvm)
        {
            xmldoc = new XmlDocument();
            FieldGrid = viewGrid;
            Dice = new Dice();
            vm = newvm;

            //gooien afhandelen
            //ThrowCommand = new ThrowDice();

            InitializeBoard();
        }
示例#4
0
 public IActionResult Searchpage(View_Model viewmod)
 {
     viewmodel.Account.Name       = HttpContext.Session.GetString("_Name");
     viewmodel.Account.Account_Id = HttpContext.Session.GetInt32("_Id").GetValueOrDefault(0);
     if (viewmodel.Account.Name == null && viewmodel.Account.Account_Id == 0)
     {
         return(RedirectToAction("Log_in", "Log_in"));
     }
     else
     {
         viewmodel.GetFriendsDatabase();
         viewmodel.GetFriendRequestsDatabase();
         viewmodel.GetPlaylistsDatabase();
         viewmodel.GetNumberOfFriends();
         return(View(viewmodel));
     }
 }
示例#5
0
 public IActionResult SearchSongs(View_Model viewmod)
 {
     viewmodel.Songs.Clear();
     viewmodel.GetSongsDatabase(viewmod.Song);
     return(RedirectToAction("Searchpage"));
 }
 public RoundButton(Field newField, View_Model.BoardView_Model newvm)
 {
     vm = newvm;
     field = newField;
     InitializeComponent();
 }