Esempio n. 1
0
        protected override void PopulateTable()
        {
            Console.WriteLine("SESSIONS PopulateTable");

            if (sessionTimeslots == null || sessionTimeslots.Count == 0)
            {
                // no data already here, so load it up
                if (dayID >= 0)
                {
                    var days = DaysManager.GetDays();
                    titleTextView.Text = days[dayID - 1].ToString("dddd").ToUpper();
                    sessionTimeslots   = MWC.BL.Managers.SessionManager.GetSessionTimeslots(dayID);
                }
                else
                {
                    titleTextView.Text = "ALL SESSIONS";
                    //titleTextView.Visibility = global::Android.Views.ViewStates.Gone;
                    sessionTimeslots = MWC.BL.Managers.SessionManager.GetSessionTimeslots();
                }
            }

            // Adapter is created every time, so Favorite changes are reflected each time the screen is visited
            sessionTimeslotListAdapter = new MWC.Adapters.SessionTimeslotListAdapter(this, sessionTimeslots);
            //Hook up our adapter to our ListView
            sessionListView.Adapter = sessionTimeslotListAdapter;
        }
Esempio n. 2
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(this);
        }

        //DEBUG ONLY
        if (dayToSet < 0)
        {
            PlayerPrefs.SetInt("Day", 0);
        }
        else
        {
            PlayerPrefs.SetInt("Day", dayToSet);
        }
        //DEBUG ONLY

        Day = PlayerPrefs.GetInt("Day");
        print("day " + Day);
        //DEBUG ONLY
    }
Esempio n. 3
0
        private static void Main(string[] args)
        {
            var printer = new Printer.Printer();

            if (args.Length == 0)
            {
                printer.PrintLine("No input file path was specified.");
                Console.Read();
                return;
            }
            try
            {
                var filePath   = args[0].Trim();
                var reader     = new Reader.Reader();
                var cheeseList = reader.Load(filePath);

                printer.PrintLine("");
                printer.PrintLine(
                    "This application has been designed and implemented by Masoud ZehtabiOskuie as an assessment for Senior C# Developer role");
                var currentDate = Helper.GetDateTime('_', filePath, 1);

                var cheeseValidator = new CheeseValidator();
                var priceCalculationRulesContainer = new PriceCalculationRulesContainer();
                var priceResolversContainer        = new PriceResolversContainer();
                var priceCalculator = new PriceCalculator(cheeseValidator, priceCalculationRulesContainer,
                                                          priceResolversContainer);

                var daysManager  = new DaysManager(3000, currentDate);
                var storeManager = new StoreManager(priceCalculator, printer, daysManager)
                {
                    Cheeses = (List <ICheese>)cheeseList
                };
                storeManager.OpenStore();
            }
            catch (FileNotFoundException)
            {
                printer.PrintLine("File Does not exists. Please make sure that the path is correct.");
            }
            catch (XmlSchemaException)
            {
                printer.PrintLine("The XML files is not well format.");
            }
            catch (DateTimeFormatException dex)
            {
                printer.PrintLine(dex.Message);
            }
            Console.Read();
        }
Esempio n. 4
0
 public DaysTableSource() : base()
 {
     days = DaysManager.GetDays();
 }
 public void DaysManagerTestsCleanup()
 {
     _daysManager.Stop();
     _daysManager.Dispose();
     _daysManager = null;
 }
 public void DaysManagerTestsSetup()
 {
     _daysManager = new DaysManager(Interval, _now);
 }
Esempio n. 7
0
    //private ObjectManager objectsManager;


    void Start()
    {
        daysManager = GameObject.FindGameObjectWithTag("DaysManager").GetComponent <DaysManager>();
        //ObjectManager objectsManager = GameObject.FindGameObjectWithTag("ObjectsManager").GetComponent<ObjectManager>();
        SoundManager.PlayMusique("salad");
    }
 public DaysListAdapter(Activity context)
     : base()
 {
     this.context = context;
     days         = DaysManager.GetDays();
 }