Exemple #1
0
        public void LoadPreferences(Preferences prefs, String key, bool appOnly)
        {
            m_DayView.TaskColorIsBackground        = prefs.GetProfileBool("Preferences", "ColorTaskBackground", false);
            m_DayView.ShowParentsAsFolder          = prefs.GetProfileBool("Preferences", "ShowParentsAsFolders", false);
            m_DayView.AutoCalculateDependencyDates = prefs.GetProfileBool("Preferences", "AutoAdjustDependents", false);
            m_DayView.StrikeThruDoneTasks          = prefs.GetProfileBool("Preferences", "StrikethroughDone", true);
            m_DayView.ShowLabelTips = !prefs.GetProfileBool("Preferences", "ShowInfoTips", false);

            m_AllowModifyTimeEstimate = !prefs.GetProfileBool("Preferences", "SyncTimeEstAndDates", false);

            m_WorkWeek.Load(prefs);
            m_DayView.WeekendDays = m_WorkWeek.WeekendDays();

            int gridColor = -1;

            if (prefs.GetProfileBool("Preferences", "SpecifyGridColor", true))
            {
                gridColor = prefs.GetProfileInt("Preferences\\Colors", "GridLines", -1);
            }

            m_DayView.GridlineColor = ((gridColor == -1) ? DefGridColor : DrawingColor.ToColor((UInt32)gridColor));

            if (!appOnly)
            {
                // private settings
                m_PrefsDlg.LoadPreferences(prefs, key);
                UpdateDayViewPreferences();

                SetDaysShowing(prefs.GetProfileInt(key, "DaysShowing", 7));
            }
            else
            {
                UpdateWorkingHourDisplay();
            }
        }
Exemple #2
0
        public void LoadPreferences(Preferences prefs, String key, bool appOnly)
        {
            bool taskColorIsBkgnd = prefs.GetProfileBool("Preferences", "ColorTaskBackground", false);

            m_DayView.TaskColorIsBackground = taskColorIsBkgnd;

            bool showParentsAsFolder = prefs.GetProfileBool("Preferences", "ShowParentsAsFolders", false);

            m_DayView.ShowParentsAsFolder = showParentsAsFolder;

            m_AllowModifyTimeEstimate = !prefs.GetProfileBool("Preferences", "SyncTimeEstAndDates", false);

            m_WorkWeek.Load(prefs);
            m_DayView.WeekendDays = m_WorkWeek.WeekendDays();

            if (!appOnly)
            {
                // private settings
                m_PrefsDlg.LoadPreferences(prefs, key);
                UpdateDayViewPreferences();
            }
            else
            {
                UpdateWorkingHourDisplay();
            }
        }