Example #1
0
        /// <summary>
        /// Load the element for a specific member
        /// </summary>
        /// <param name="seletction"></param>
        public void LoadElement(string selection)
        {
            if (tableSource != null)
            {
                UIStackCalendarObjects.Items.Clear();

                List <calendarObject> cObjs = AppCore.dCore.CalendarObjectManager.ListCalendarObjects(tableSource);
                if (cObjs.ToArray().Length != 0)
                {
                    foreach (calendarObject cObj in cObjs)
                    {
                        CalendarObjectView cObjView = new CalendarObjectView(cObj);
                        cObjView.MouseDoubleClick += CObjView_MouseDoubleClick;
                        if (selection == DefaultUser || selection == cObj.equipe.value)
                        {
                            UIStackCalendarObjects.Items.Add(cObjView);
                        }
                    }
                }
                else
                {
                    TextBlock tb = new TextBlock()
                    {
                        Text = "No events"
                    };
                    UIStackCalendarObjects.Items.Add(tb);
                }
            }
        }
Example #2
0
        private void CObjView_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            CalendarObjectView cView = (CalendarObjectView)sender;

            if (cView.CalendarObject.isRepository.value == true && cView.CalendarObject.projectTableName.value != null)
            {
                SetNewValue(cView.CalendarObject.projectTableName.value);
            }
            else
            {
                UI.UIObjectManager.ChangeCalendarObject(cView.CalendarObject);
            }
        }