예제 #1
0
        public static void AddNewElement(string tableSource)
        {
            Add_Project inputDialog = new Add_Project()
            {
                Style  = (Style)App.Current.Resources["BlankWindow"],
                Height = 500,
                Width  = 600
            };

            if (tableSource != "")
            {
                inputDialog.parentTable = tableSource;
            }

            if (inputDialog.ShowDialog().Value)
            {
                try
                {
                    calendarObject obj = inputDialog.CalendarObject;
                    Core.AppCore.dCore.CalendarObjectManager.AddCalendarObject(obj);
                }
                catch (Exception ex)
                {
                    ex.Source = "SQL_lite_database_search_wpf.UI.UIObjectManager.addNewElement(string)";
                    Usefull_Tools.ErrorHandeler.printOut(ex);
                }
                calendarContentChanged?.Invoke();
            }
        }
예제 #2
0
        public static calendarObject ChangeCalendarObject(calendarObject cObj)
        {
            Add_Project inputDialog = new Add_Project(cObj)
            {
                Style = (Style)App.Current.Resources["BlankWindow"]
            };

            if (inputDialog.ShowDialog().Value)
            {
                cObj = inputDialog.UICalendarInformation.CalendarObject;

                // update
                Core.AppCore.dCore.CalendarObjectManager.UpdateCalendarObject(cObj);

                calendarContentChanged?.Invoke();
            }

            return(cObj);
        }