Пример #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            // Setup Message Server
            _store = MessageStore.GetMessageStore();

            // Update message count
            this.itemCountLabel.Text = String.Format(this.itemCountLabel.Text, _store.Messages.Count);

            // Setup Online/Offline
            _onlineImage  = Properties.Resources.Outlook;
            _offlineImage = Properties.Resources.Error;

            // Check for Network Changes
            NetworkChange.NetworkAvailabilityChanged += new NetworkAvailabilityChangedEventHandler(NetworkChange_NetworkAvailabilityChanged);

            // Set Status Bar
            UpdateStatusBar();

            // Set icon
            this.Icon = Icon.FromHandle(Properties.Resources.Outlook.GetHicon());

            // Track Preference Changes
            Microsoft.Win32.SystemEvents.UserPreferenceChanged += new Microsoft.Win32.UserPreferenceChangedEventHandler(Form1_UserPreferenceChanged);
        }
Пример #2
0
        public FolderView()
        {
            // Set the Font
            SetFont();

            // Initialize
            InitializeComponent();

            // Set Node Fonts
            SetNodeFonts(this.folderTreeView.Nodes);

            // Set dock to top
            this.Dock = DockStyle.Fill;

            // Attach to the MessageStore
            _store = MessageStore.GetMessageStore();

            this._unreadCount  = _store.UnreadCount;
            this._draftsCount  = _store.DraftsCount;
            this._deletedCount = _store.DeletedCount;

            // Check for changes
            _store.PropertyChanged += new PropertyChangedEventHandler(MessageStore_PropertyChanged);
        }