コード例 #1
0
            public Palette(ItemPalette parent, Point location)
            {
                this.parent       = parent;
                this.enabledItems = new ItemList <System.Workflow.ComponentModel.Design.ItemInfo>(this);
                foreach (System.Workflow.ComponentModel.Design.ItemInfo info in this.parent.items)
                {
                    ActivityDesignerVerb verb = info.UserData[DesignerUserDataKeys.DesignerVerb] as ActivityDesignerVerb;
                    if ((verb == null) || verb.Enabled)
                    {
                        this.enabledItems.Add(info);
                    }
                }
                this.menuItemCount = this.enabledItems.Count;
                base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true);
                base.FormBorderStyle = FormBorderStyle.None;
                this.BackColor       = Color.White;
                base.ShowInTaskbar   = false;
                base.MaximizeBox     = false;
                base.ControlBox      = false;
                base.StartPosition   = FormStartPosition.Manual;
                Screen screen = Screen.FromPoint(location);

                this.workingRectangle = screen.WorkingArea;
                this.PreparePalette(location);
                this.paletteShadow = new PaletteShadow(this);
            }
コード例 #2
0
 private void DestroyShadow()
 {
     if (this.paletteShadow != null)
     {
         this.paletteShadow.Close();
         this.paletteShadow.Dispose();
         this.paletteShadow = null;
     }
 }
コード例 #3
0
 private void DestroyShadow()
 {
     if (this.paletteShadow != null)
     {
         this.paletteShadow.Close();
         this.paletteShadow.Dispose();
         this.paletteShadow = null;
     }
 }
コード例 #4
0
            public Palette(ItemPalette parent, Point location)
            {
                this.parent = parent;

                //copy over only items with enabled commands
                this.enabledItems = new ItemList<ItemInfo>(this);
                foreach (ItemInfo item in this.parent.items)
                {
                    ActivityDesignerVerb smartVerb = item.UserData[DesignerUserDataKeys.DesignerVerb] as ActivityDesignerVerb;
                    if (smartVerb == null || smartVerb.Enabled)
                        this.enabledItems.Add(item);
                }

                this.menuItemCount = this.enabledItems.Count;

                SetStyle(ControlStyles.OptimizedDoubleBuffer |
                            ControlStyles.UserPaint |
                            ControlStyles.SupportsTransparentBackColor |
                            ControlStyles.AllPaintingInWmPaint, true);

                FormBorderStyle = FormBorderStyle.None;
                BackColor = Color.White;
                ShowInTaskbar = false;
                MaximizeBox = false;
                ControlBox = false;
                StartPosition = FormStartPosition.Manual;

                Screen closestScreen = Screen.FromPoint(location);
                this.workingRectangle = closestScreen.WorkingArea;

                PreparePalette(location);

                this.paletteShadow = new PaletteShadow(this);
            }
コード例 #5
0
 public Palette(ItemPalette parent, Point location)
 {
     this.parent = parent;
     this.enabledItems = new ItemList<System.Workflow.ComponentModel.Design.ItemInfo>(this);
     foreach (System.Workflow.ComponentModel.Design.ItemInfo info in this.parent.items)
     {
         ActivityDesignerVerb verb = info.UserData[DesignerUserDataKeys.DesignerVerb] as ActivityDesignerVerb;
         if ((verb == null) || verb.Enabled)
         {
             this.enabledItems.Add(info);
         }
     }
     this.menuItemCount = this.enabledItems.Count;
     base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.SupportsTransparentBackColor | ControlStyles.UserPaint, true);
     base.FormBorderStyle = FormBorderStyle.None;
     this.BackColor = Color.White;
     base.ShowInTaskbar = false;
     base.MaximizeBox = false;
     base.ControlBox = false;
     base.StartPosition = FormStartPosition.Manual;
     Screen screen = Screen.FromPoint(location);
     this.workingRectangle = screen.WorkingArea;
     this.PreparePalette(location);
     this.paletteShadow = new PaletteShadow(this);
 }