예제 #1
0
        public ViewModelPopupMenuCell(ViewModelMainRSS viewModelMainRSS, ModelTableRSS model)
        {
            ViewModelMainRSS = viewModelMainRSS;
            Model            = model;

            CommandShowEditRSS = new Command(ShowEditRSS);
            CommandDeleteRSS   = new Command(DeleteRSS);
            CommandHideViewRSS = new Command(HideViewRSS);
        }
        public ViewModelPopupAddAndEditRSS(ViewModelMainRSS viewModelMainRSS,
                                           string key, ModelTableRSS model = null)
        {
            ViewModelMainRSS = viewModelMainRSS;

            SourceModel         = model;
            Key                 = key;
            CommandHideViewRSS  = new Command(HideViewRSS);
            CommandAddOrEditRSS = new Command(AddOrEditRSS);

            switch (key)
            {
            case "Add":
                TextAddOrUpdate = "Добавить";
                break;

            case "Edit":
                TextAddOrUpdate = "Обновить";
                NewTitleRSS     = model.Title;
                NewURLRSS       = model.URLRSS;
                break;
            }
        }
예제 #3
0
 public ViewMainRSS()
 {
     BindingContext = new ViewModelMainRSS(Navigation);
     InitializeComponent();
 }