Exemple #1
0
 // The only way to get the object's instance
 public static CommonEvents GetEvents()
 {
     if (theCommonEventsInstance == null)
     {
         theCommonEventsInstance = new CommonEvents();
     }
     return(theCommonEventsInstance);
 }
Exemple #2
0
        ///
        /// Interface methods for User Controls
        ///

        public void Init(DateTime firstDayOfWeek)
        {
            Initialized = false;
            if (dbDetector == null)
            {
                dbDetector              = DBDetector.GetDBDetector();
                dbDetector.SiteChanged += new VWA4Common.DBDetectorEventHandler(dbDetector_SiteChanged);
                //dbDetector.PathChanged += new DBDetectorEventHandler(dbDetector_PathChanged);
                //dbDetector.WeekChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.DBPathChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.AdjustmentsChanged += new DBDetectorEventHandler(dbDetector_AdjustmentsChanged);
                dbDetector.UserLogin += new DBDetectorLoginEventHandler(dbDetector_UserLogin);
            }
            if (commonEvents == null)
            {
                commonEvents = VWA4Common.CommonEvents.GetEvents();
                commonEvents.UpdateProductUIData +=
                    new VWA4Common.UpdateProductUIDataEventHandler(commonEvents_UpdateProductUI);
            }
            // Initialize comboboxes
            cbGoalPriority.Items.Clear();
            cbGoalPriority.Items.Add(new ComboBoxItem("Urgent Priority", 3));
            cbGoalPriority.Items.Add(new ComboBoxItem("High Priority", 2));
            cbGoalPriority.Items.Add(new ComboBoxItem("Normal Priority", 1));
            cbGoalPriority.Items.Add(new ComboBoxItem("Low Priority", 0));

            cbGoalType.Items.Clear();
            cbGoalType.Items.Add(new ComboBoxItem("Dollar Amount", 0));
            cbGoalType.Items.Add(new ComboBoxItem("Weight Amount", 1));

            cbGoalMode.Items.Clear();
            cbGoalMode.Items.Add(new ComboBoxItem("Target Percentage Change", 0));
            cbGoalMode.Items.Add(new ComboBoxItem("Target Specific Amount", 1));


            cbFilterType.Items.Clear();
            cbFilterType.Items.Add(new ComboBoxItem("Food Type Tag Filter", 0));
            cbFilterType.Items.Add(new ComboBoxItem("Complex Filter", 1));


            //InitProductUI();
            ulvGoalList.ItemSettings.SelectionType = SelectionType.Single;
            _IsActive = true;
        }
        ///
        /// Interface methods for User Controls
        ///

        public void Init(DateTime firstDayOfWeek)
        {
            Initialized = false;
            if (dbDetector == null)
            {
                dbDetector = DBDetector.GetDBDetector();
                //dbDetector.PathChanged += new DBDetectorEventHandler(dbDetector_PathChanged);
                //dbDetector.WeekChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.DBPathChanged += new DBDetectorEventHandler(dbDetector_WeekChanged);
                //dbDetector.AdjustmentsChanged += new DBDetectorEventHandler(dbDetector_AdjustmentsChanged);
                dbDetector.UserLogin += new DBDetectorLoginEventHandler(dbDetector_UserLogin);
            }
            if (commonEvents == null)
            {
                commonEvents = VWA4Common.CommonEvents.GetEvents();
                commonEvents.UpdateProductUIData +=
                    new VWA4Common.UpdateProductUIDataEventHandler(commonEvents_UpdateProductUI);
            }
            _IsActive = true;
        }
Exemple #4
0
 public UtilitiesInstance()
 {
     commonEvents = CommonEvents.GetEvents();
 }