Exemple #1
0
        public EditInfluecerViewModel(InfluencerModel influencer)
        {
            // Property
            Influencer      = influencer;
            ValidationRules = new InfluencerValidator();

            // Command
            PutCommand = new Command(Put);
        }
Exemple #2
0
        // ctor
        public AddInfluecerViewModel()
        {
            // Property
            Influencer      = new InfluencerModel();
            ValidationRules = new InfluencerValidator();

            // Command
            PostCommand = new Command(Post);
        }
Exemple #3
0
    public LootBoxModel()
    {
        if (Instance != null)
        {
            Debug.LogWarning("Replacing the current model!");
        }
        Instance = this;

        List <Units> unitTypes = Enum.GetValues(typeof(Units)).Cast <Units>().ToList();

        Resources = new Dictionary <Units, Resource>();
        for (int i = 0; i < unitTypes.Count; i++)
        {
            Units type = unitTypes[i];
            Resources.Add(type, new Resource(type, 0));
        }

        UpgradeManager          = new UpgradeManager(this);
        UpgradeManager.IsActive = true;
        Time = new TimeModel(this);

        Life          = new LifeModel(this);
        Life.IsActive = true;

        Job          = new JobModel(this);
        Job.IsActive = false;

        MacGuffinQuest          = new MacGuffinQuest(this);
        MacGuffinQuest.IsActive = false;

        Influencer          = new InfluencerModel(this);
        Influencer.IsActive = false;

        Studio          = new StudioModel(this);
        Studio.IsActive = false;

        Public          = new PublicModel(this);
        Public.IsActive = false;

        SetInitialState();

#if DEBUG
        if (UnlockAllViews)
        {
            Life.IsActive           = true;
            UpgradeManager.IsActive = true;
            Job.IsActive            = true;
            MacGuffinQuest.IsActive = true;
            Influencer.IsActive     = true;
            Studio.IsActive         = true;
            Public.IsActive         = true;
        }
#endif
    }
Exemple #4
0
        // Constructor
        public InfluencerViewModel()
        {
            // Property
            SelectedInfluencer = new InfluencerModel();
            influencers        = new ObservableCollection <InfluencerModel>();

            // Get
            Get();

            // Command
            SaveAsPDFCommand    = new Command(SaveAsPDF);
            DeleteCommand       = new Command(Delete);
            GoToPutPageCommand  = new Command(GoToPutPage);
            PullRefreshCommand  = new Command(Refresh);
            GoToPostPageCommand = new Command(GoToPostPage);
        }