Esempio n. 1
0
        void SetComboColours(Owf.Controls.Office2007ColorPicker fg, Owf.Controls.Office2007ColorPicker bg, Daemon src, Daemon dest)
        {
            var k = new Key(src, dest);

            fg.Color = Pairs[k].Item1;
            bg.Color = Pairs[k].Item2;
        }
Esempio n. 2
0
        public SpriteViewer()
        {
            pictureBox1 = new PictureBox();
            (pictureBox1 as System.ComponentModel.ISupportInitialize).BeginInit();
            SuspendLayout();
            Panel panel1 = new Panel();

            pictureBox1.Location = new Point(0, 0);
            pictureBox1.Name     = "pictureBox1";
            pictureBox1.Size     = new Size(256, 50);
            pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
            pictureBox1.TabStop  = false;
            AutoScroll           = false;
            Name = "SpriteViewer";
            Size = new Size(256 + 10 + SystemInformation.VerticalScrollBarWidth, 100);

            office2007ColorPicker1 = new Owf.Controls.Office2007ColorPicker();
            Controls.Add(office2007ColorPicker1);
            office2007ColorPicker1.Color    = Color.Black;
            office2007ColorPicker1.Location = new Point(3, Height - office2007ColorPicker1.Height - 3);
            office2007ColorPicker1.Anchor   = AnchorStyles.Left | AnchorStyles.Bottom;
            panel1.Bounds     = new Rectangle(0, 0, Size.Width, office2007ColorPicker1.Location.Y - 3);
            panel1.AutoScroll = true;
            panel1.BackColor  = Color.Black;
            panel1.Anchor     = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            panel1.Controls.Add(pictureBox1);
            Controls.Add(panel1);

            pictureBox1.BackColor = Color.Black;
            (pictureBox1 as System.ComponentModel.ISupportInitialize).EndInit();
            ResumeLayout(false);
            PerformLayout();
            office2007ColorPicker1.SelectedColorChanged += new System.EventHandler(office2007ColorPicker1_SelectedColorChanged);
        }
Esempio n. 3
0
        public SpriteViewer()
        {
            pictureBox1 = new PictureBox();
            ( pictureBox1 as System.ComponentModel.ISupportInitialize ).BeginInit();
            SuspendLayout();
            Panel panel1 = new Panel();
            pictureBox1.Location = new Point( 0, 0 );
            pictureBox1.Name = "pictureBox1";
            pictureBox1.Size = new Size( 256, 50 );
            pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
            pictureBox1.TabStop = false;
            AutoScroll = false;
            Name = "SpriteViewer";
            Size = new Size( 256 + 10 + SystemInformation.VerticalScrollBarWidth, 100 );

            office2007ColorPicker1 = new Owf.Controls.Office2007ColorPicker();
            Controls.Add( office2007ColorPicker1 );
            office2007ColorPicker1.Color = Color.Black;
            office2007ColorPicker1.Location = new Point( 3, Height - office2007ColorPicker1.Height - 3 );
            office2007ColorPicker1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
            panel1.Bounds = new Rectangle( 0, 0, Size.Width, office2007ColorPicker1.Location.Y - 3 );
            panel1.AutoScroll = true;
            panel1.BackColor = Color.Black;
            panel1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            panel1.Controls.Add( pictureBox1 );
            Controls.Add( panel1 );

            pictureBox1.BackColor = Color.Black;
            ( pictureBox1 as System.ComponentModel.ISupportInitialize ).EndInit();
            ResumeLayout( false );
            PerformLayout();
            office2007ColorPicker1.SelectedColorChanged += new System.EventHandler(office2007ColorPicker1_SelectedColorChanged);
        }
Esempio n. 4
0
        public SpriteViewer()
        {
            pictureBox1 = new PictureBox();
            (pictureBox1 as System.ComponentModel.ISupportInitialize).BeginInit();
            SuspendLayout();
            Panel panel1 = new Panel();

            pictureBox1.Location = new Point(0, 0);
            pictureBox1.Name     = "pictureBox1";
            pictureBox1.Size     = new Size(256, 50);
            pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
            pictureBox1.TabStop  = false;
            AutoScroll           = false;
            Name = "SpriteViewer";
            Size = new Size(256 + 10 + SystemInformation.VerticalScrollBarWidth, 100);
            pictureBox1.MouseWheel += pictureBox1_MouseWheel;

            office2007ColorPicker1 = new Owf.Controls.Office2007ColorPicker();
            Controls.Add(office2007ColorPicker1);
            office2007ColorPicker1.Color    = Color.Black;
            office2007ColorPicker1.Location = new Point(3, Height - office2007ColorPicker1.Height - 3);
            office2007ColorPicker1.Anchor   = AnchorStyles.Left | AnchorStyles.Bottom;
            panel1.AllowDrop  = true;
            panel1.Bounds     = new Rectangle(0, 0, Size.Width, office2007ColorPicker1.Location.Y - 3);
            panel1.AutoScroll = true;
            panel1.BackColor  = Color.Black;
            panel1.Anchor     = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            panel1.Controls.Add(pictureBox1);
            panel1.DragDrop  += new System.Windows.Forms.DragEventHandler(sprite_DragDrop);
            panel1.DragEnter += new System.Windows.Forms.DragEventHandler(sprite_DragEnter);
            Controls.Add(panel1);

            cmbZoom = new ComboBox();
            Controls.Add(cmbZoom);
            for (int mult = 1; mult < 17; mult++)
            {
                cmbZoom.Items.Add(new Zoom(mult, ((mult * 100).ToString() + "%")));
            }
            cmbZoom.Size                  = new Size(75, 20);
            cmbZoom.Location              = new Point((Width - cmbZoom.Width - 3), (Height - cmbZoom.Height - 3));
            cmbZoom.Anchor                = AnchorStyles.Right | AnchorStyles.Bottom;
            cmbZoom.SelectedIndex         = 0;
            cmbZoom.SelectedIndexChanged += new System.EventHandler(cmbZoom_SelectedIndexChanged);

            pictureBox1.BackColor = Color.Black;
            (pictureBox1 as System.ComponentModel.ISupportInitialize).EndInit();
            ResumeLayout(false);
            PerformLayout();
            office2007ColorPicker1.SelectedColorChanged += new System.EventHandler(office2007ColorPicker1_SelectedColorChanged);

            AutoSize = false;

            UpdateZoom();
        }