Exemple #1
0
        public BaseViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin)
        {
            Service = service;

            _deviceInfoPlugin   = deviceInfoPlugin;
            DeviceInfo          = _deviceInfoPlugin.GetDeviceInfo();
            Settings.DeviceInfo = DeviceInfo;
            Status = _deviceInfoPlugin.NetworkStatus;
        }
		public BaseViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin)
		{
			Service = service;

			_deviceInfoPlugin = deviceInfoPlugin;
			DeviceInfo = _deviceInfoPlugin.GetDeviceInfo();
			Settings.DeviceInfo = DeviceInfo;
			Status = _deviceInfoPlugin.NetworkStatus;
		}
		public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
		{
			var ignored = base.OnCreateView(inflater, container, savedInstanceState);
			this.EnsureBindingContextIsSet(savedInstanceState);
			View _view = this.BindingInflate(Resource.Layout.MenuView, null);

			_deviceInfoPlugin = Mvx.Resolve<IMvxDeviceInfo>();
			_deviceInfo = _deviceInfoPlugin.GetDeviceInfo ();

			View mv = _view.FindViewById (Resource.Id.menu_view_layout_main);
			TreeListView treeView = (TreeListView)_view.FindViewById (Resource.Id.menu_categories_listview);
			return _view;
		}
		public LoginViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
        {
			#if DEBUG
//			Username = "******";
//			Password= "******";
			#endif

			//IsLoading = false;
			try {
				LoadSavedData();
			} catch (Exception e ){
			}
        }
        public LoginViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
        {
                        #if DEBUG
//			Username = "******";
//			Password= "******";
                        #endif

            //IsLoading = false;
            try {
                LoadSavedData();
            } catch (Exception e) {
            }
        }
		public RootViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin):base(service,deviceInfoPlugin)
		{
			if (Settings.USE_RECENT_POSTS ){
				Home = new RecentPostsViewModel(service, deviceInfoPlugin);
				((RecentPostsViewModel)Home).Init(Settings.RECENT_POST_CATEGORY_ID, "Home");
			} else {
				Home = new HomeViewModel(service, deviceInfoPlugin);
			}
			Menu = new MenuViewModel();
			Service = service;

			Settings.RootViewModel = this;
			Mvx.Trace ("Init RootViewModel");
		}
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var ignored = base.OnCreateView(inflater, container, savedInstanceState);

            this.EnsureBindingContextIsSet(savedInstanceState);
            View _view = this.BindingInflate(Resource.Layout.MenuView, null);

            _deviceInfoPlugin = Mvx.Resolve <IMvxDeviceInfo>();
            _deviceInfo       = _deviceInfoPlugin.GetDeviceInfo();

            View         mv       = _view.FindViewById(Resource.Id.menu_view_layout_main);
            TreeListView treeView = (TreeListView)_view.FindViewById(Resource.Id.menu_categories_listview);

            return(_view);
        }
        public RootViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
        {
            if (Settings.USE_RECENT_POSTS)
            {
                Home = new RecentPostsViewModel(service, deviceInfoPlugin);
                ((RecentPostsViewModel)Home).Init(Settings.RECENT_POST_CATEGORY_ID, "Home");
            }
            else
            {
                Home = new HomeViewModel(service, deviceInfoPlugin);
            }
            Menu    = new MenuViewModel();
            Service = service;

            Settings.RootViewModel = this;
            Mvx.Trace("Init RootViewModel");
        }
		public RecentPostsViewModel (IFNewsService service, IMvxDeviceInfo deviceInfoPlugin): base(service, deviceInfoPlugin)
		{
			
		}
		public PostCommentsViewModel (IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
		{
		}
Exemple #11
0
 public CatalogNewsViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
 {
     ListPost = new ObservableCollection <Post> ();
 }
 public FirstViewModel(IMvxDeviceInfo deviceInfoPlugin)
 {
     _deviceInfoPlugin = deviceInfoPlugin;
 }
		public CatalogNewsViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin): base(service, deviceInfoPlugin) {
			ListPost = new ObservableCollection<Post> ();
		}
Exemple #14
0
 public PostViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
 {
     SupportLike = false;
 }
 public PostCommentsViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
 {
 }
Exemple #16
0
 public RecentPostsViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
 {
 }
Exemple #17
0
 public HomeViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin)
 {
     GroupedPosts = new ObservableCollection <CatalogPostsGroup> ();
 }
		public PostViewModel(IFNewsService service, IMvxDeviceInfo deviceInfoPlugin) : base(service, deviceInfoPlugin) {
			SupportLike = false;
		}