Example #1
0
        public MainForm()
        {
            InitializeComponent();

            if (!InitialSetupComplete()) return;

            System.Console.Write(Environment.OSVersion);

            if (Settings.Default.ShowOnDesktop)
            {
                desktopDisplay = new DesktopDisplay(this);
                desktopDisplay.Show();
            }

            InitializeTodoText();
            Settings.Default.PropertyChanged += new PropertyChangedEventHandler(Default_PropertyChanged);
        }
Example #2
0
 private void Default_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     switch (e.PropertyName)
     {
         case "FileLocation":
             todoFileWatcher.FileSystemWatcher.Dispose();
             InitializeTodoText();
             break;
         case "Font":
             todoText.Font = Settings.Default.Font;
             break;
         case "ShowOnDesktop":
             if (Settings.Default.ShowOnDesktop)
             {
                 if (desktopDisplay == null)
                     desktopDisplay = new DesktopDisplay(this);
                 desktopDisplay.Show();
             }
             else
             {
                 if (desktopDisplay != null)
                     desktopDisplay.Close();
                 desktopDisplay = null;
             }
             break;
     }
 }