/// <summary>
 /// Initializes child preferences controls with settings
 /// </summary>
 public void InitializeWithSettings(Settings settings)
 {
     this.settings = settings;
     startingOptionsControl.InitializeStartingOptions(settings);
     flexiCommandsControl.InitializeFlexiCommands(settings);
     fontColorSettingsControl.InitializeFontColorControl(settings);
 }
Beispiel #2
0
        /// <summary>
        /// Constructor for Logic class. Initializes all necessary components.
        /// </summary>
        public Logic()
        {
            mainSettings = new Settings();

            storage = new Storage("ToDo++.xml", "ToDoSettings.xml");

            mainSettings.UpdateSettings(storage.LoadSettingsFromFile());
            EventHandlers.UpdateSettingsHandler += UpdateSettings;

            commandParser = new CommandParser();

            taskList = storage.LoadTasksFromFile();
            while (taskList == null)
            {
                PromptUser_CreateNewTaskFile();
                taskList = storage.LoadTasksFromFile();
            }
        }
 /// <summary>
 /// Intialize FlexiCommands with an instance of settings
 /// </summary>
 /// <param name="settings"></param>
 public void InitializeFontColorControl(Settings settings)
 {
     this.settings = settings;
 }
        /// <summary>
        /// Initializes settings for this component.
        /// </summary>
        /// <param name="settings">The settings to use to initialize this component with.</param>
        internal void InitializeSettings(Settings settings)
        {
            this.settings = settings;
            this.SetFormatting(settings.GetTextSize(), settings.GetFontSelection());
            this.RowHeight = 32;
            this.ShowItemToolTips = true;
            this.HeaderStyle = ColumnHeaderStyle.None;

            this.defaultCol = this.AllColumns.Find(e => e.AspectName == COL_NAME_TASK_NAME);
            this.defaultCol.WordWrap = true;
            this.AlwaysGroupByColumn = defaultCol;

            this.AllColumns.Find(e => e.AspectName == COL_NAME_DONE_STATE).AspectToStringConverter = delegate(object state)
            {
                if ((bool)state == true) return MESSAGE_STYLE_DONE;
                else return String.Empty;
            };

            SetGroupingByDateTime();

            EmptyListMsg = MESSAGE_EMPTY_LIST;
        }
 /// <summary>
 /// Intialize FlexiCommands with an instance of settings
 /// </summary>
 /// <param name="settings"></param>
 public void InitializeFlexiCommands(Settings settings)
 {
     this.settings = settings;
     this.selectedFlexiCommands=new List<string>();
 }
Beispiel #6
0
 /// <summary>
 /// Currently sets the Text Size of the OutputBox
 /// </summary>
 public void InitializeWithSettings(Settings settings)
 {
     this.settings = settings;
     this.SetOutputSize(settings.GetTextSize());
 }
 /// <summary>
 /// Initializes Starting Options control with settings
 /// </summary>
 /// <param name="settings"></param>
 public void InitializeStartingOptions(Settings settings)
 {
     this.settings = settings;
     InitializeCheckBoxes();
 }