Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         this.DisableEvents();
         if (this.m_backgroundImage != null)
         {
             this.m_backgroundImage.Dispose();
             this.m_backgroundImage = null;
         }
         if (this.m_bmp != null)
         {
             this.m_bmp.Dispose();
             this.m_bmp = null;
         }
         if (this.m_graphics != null)
         {
             this.m_graphics.Dispose();
             this.m_graphics = null;
         }
         if (this.m_penFrame != null)
         {
             this.m_penFrame.Dispose();
             this.m_penFrame = null;
         }
         if (this.m_groups != null)
         {
             this.m_groups.Dispose();
             this.m_groups = null;
         }
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
        public OutlookShortcutBar()
        {
            Graphics graphics = base.CreateGraphics();

            ShortcutsCollection.m_scaleFactor    = new SizeF(graphics.DpiX / 96f, graphics.DpiY / 96f);
            ShortcutsCollection.m_Spacing        = (int)(5f * ShortcutsCollection.m_scaleFactor.Width);
            ShortcutsCollection.ParentControl    = this;
            ShortcutsCollection.GestureDetected += new Resco.Controls.OutlookControls.GestureDetectedHandler(this.ShortcutsCollection_GestureDetected);
            ShortcutsCollection.m_Arrow[0]       = new Point((int)(3f * ShortcutsCollection.m_scaleFactor.Width), (int)(6f * ShortcutsCollection.m_scaleFactor.Height));
            ShortcutsCollection.m_Arrow[1]       = new Point((int)((13f * ShortcutsCollection.m_scaleFactor.Width) - 1f), (int)(6f * ShortcutsCollection.m_scaleFactor.Height));
            ShortcutsCollection.m_Arrow[2]       = new Point((int)((8f * ShortcutsCollection.m_scaleFactor.Width) - 1f), (int)(11f * ShortcutsCollection.m_scaleFactor.Height));
            GroupsCollection.m_scaleFactor       = ShortcutsCollection.m_scaleFactor;
            this.Text      = null;
            this.Font      = new Font("Tahoma", 8f, FontStyle.Regular);
            this.BackColor = SystemColors.Window;
            this.ForeColor = SystemColors.ControlText;
            this.m_groups  = new GroupsCollection(this);
            this.m_groups.InsertCompleteEvent          += new InsertCompleteEventHandler(this.OnGroupsUpdateInsert);
            this.m_groups.RemoveEvent                  += new RemoveEventHandler(this.OnGroupsUpdateRemove);
            this.m_groups.SetCompleteEvent             += new SetCompleteEventHandler(this.OnGroupsUpdateSet);
            this.m_groups.SelectedGroupIndexChanged    += new Resco.Controls.OutlookControls.SelectedIndexChangedEventHandler(this.OnSelectedGroupIndexChanged);
            this.m_groups.SelectedShortcutIndexChanged += new Resco.Controls.OutlookControls.SelectedIndexChangedEventHandler(this.OnSelectedShortcutIndexChanged);
            this.m_groups.ShortcutEntered              += new Resco.Controls.OutlookControls.SelectedIndexChangedEventHandler(this.OnShortcutEntered);
            this.m_groups.Invalidating                 += new EventHandler(this.OnInvalidating);
        }
Exemplo n.º 3
0
 internal void Dispose()
 {
     this.m_Parent = null;
     this.DisableEvents();
     if (this.m_shortcuts != null)
     {
         this.m_shortcuts.Dispose();
         this.m_shortcuts = null;
     }
 }