Ejemplo n.º 1
0
        private void UpdateDrawingDisplayPanelLocation()
        {
            // TODO refactor
            Control    statusPanel = ((CCMainForm)ccMainForm).StatusPanel;
            CCMainForm mainForm    = ((CCMainForm)ccMainForm);

            switch (this.orientation)
            {
            case ToolbarOrientation.HorizontalTop:
            case ToolbarOrientation.VerticalLeft:
                statusPanel.Top  = 0;
                statusPanel.Left = 0;
                break;

            case ToolbarOrientation.VerticalRight:
                statusPanel.Top  = 0;
                statusPanel.Left = 0;
                break;

            case ToolbarOrientation.HorizontalBottom:
                statusPanel.Top  = 0;
                statusPanel.Left = 0;
                break;

            default:
                break;
            }
        }
Ejemplo n.º 2
0
        public PopGame(CCMainForm ccForm)
        {
            InitializeComponent();

            Size screenSize = Screen.PrimaryScreen.WorkingArea.Size;
            ClientSize = Screen.PrimaryScreen.WorkingArea.Size; //prevent form from getting resized
            this.triggerPoint = new Point(screenSize.Width / 2, screenSize.Height / 2);

            this.ccForm = ccForm;

            //TODO refactor
            //this.playAgainBtn.Width = ccForm.CCToolbar.ButtonWidth;
            //this.playAgainBtn.Height = ccForm.CCToolbar.ButtonHeight;
            //this.launchBtn.Width = ccForm.CCToolbar.ButtonWidth;
            //this.launchBtn.Height = ccForm.CCToolbar.ButtonHeight;

            minSize = Math.Min(CCButton.MIN_WIDTH, CCButton.MIN_HEIGHT);
            recSize = minSize;

            //minSize = Math.Min(CCButton.MIN_WIDTH, CCButton.MIN_HEIGHT);

            //initialize slideTimer
            popTimer = new Timer();
            popTimer.Interval = popTimerInterval;
            popTimer.Tick += new EventHandler(popTimer_Tick);
            timeUntilPop = TIME_FOR_POP;

        }
Ejemplo n.º 3
0
        //ToolsSlidingPanel tsp;

        public SpeedConfigForm(CCMainForm ccForm)
        {
            InitializeComponent();

            //mc = null;
            this.mc = ccForm;
            //tsp = new ToolsSlidingPanel(mc);
        }
Ejemplo n.º 4
0
 private void launchBtn_Click(object sender, EventArgs e)
 {
     if (ccForm == null || ccForm.IsDisposed == true)
     {
         ccForm = new CCMainForm("config.ini");
     }
     ccForm.Show();
     this.Hide();
 }
Ejemplo n.º 5
0
 private void camCanBtn_Click(object sender, EventArgs e)
 {
     if (ccForm == null || ccForm.IsDisposed == true)
     {
         ccForm = new CCMainForm("config.ini");
     }
     //ccMainForm.CCToolbar.ChangeOrientation(this.reccOrient);
     ccForm.Show();
     this.Hide();
 }
Ejemplo n.º 6
0
        public DrawingDisplayControl(CCMainForm ccMainForm)
        {
            InitializeComponent();
            this.ccMainForm = ccMainForm;

            //buttons in the control only for display and should not be clickable
            foreach (CCButton button in this.Controls)
            {
                button.Disable();
            }

            this.thicknessPreviewImage = new Bitmap(this.thicknessBtn.Width, this.thicknessBtn.Height);
        }
Ejemplo n.º 7
0
        public void SetForm(CCMainForm ccMainForm)
        {
            //TODO refactor
            this.ccMainForm  = ccMainForm;
            ccButton2.Width  = this.ccMainForm.CCToolbar.ButtonWidth;
            ccButton2.Height = this.ccMainForm.CCToolbar.ButtonHeight;

            ccButton1.Width  = this.ccMainForm.CCToolbar.ButtonWidth;
            ccButton1.Height = this.ccMainForm.CCToolbar.ButtonHeight;

            //keep text entry form always on top of camera canvas, but not other programs
            this.Owner = ccMainForm;

            //center text entry form to main form
            this.StartPosition = FormStartPosition.Manual;
            this.Location      = new Point(ccMainForm.Location.X + ccMainForm.Width / 2 - this.Width / 2,
                                           ccMainForm.Location.Y + ccMainForm.Height / 2 - this.Height / 2);
        }
Ejemplo n.º 8
0
        public ChaseGame(CCMainForm ccForm)
        {
            InitializeComponent();

            ClientSize = Screen.PrimaryScreen.WorkingArea.Size; //prevent form from getting resized

            this.ccForm = ccForm;

            //TODO refactor
            //playAgainBtn.Width = ccForm.CCToolbar.ButtonWidth;
            //playAgainBtn.Height = ccForm.CCToolbar.ButtonHeight;
            //camCanBtn.Width = ccForm.CCToolbar.ButtonWidth;
            //camCanBtn.Height = ccForm.CCToolbar.ButtonHeight;
            //nextBtn.Width = ccForm.CCToolbar.ButtonWidth;
            //nextBtn.Height = ccForm.CCToolbar.ButtonHeight;

            //start in the middle of the form
            this.StartPosition = FormStartPosition.CenterScreen;

            startPoint = new Point(ClientSize.Width / 2 - beeBtn.Width / 2, ClientSize.Height / 2 - beeBtn.Height / 2);

            distToBee = Math.Min(ClientSize.Width / 2, ClientSize.Height / 2);

            beePathPoints = new List <Point>();
            setBeePathPoints(startPoint, distToBee);

            elapsedTimes = new List <TimeSpan>();

            beeMoveTimer          = new Timer();
            beeMoveTimer.Interval = 50;
            beeMoveTimer.Tick    += new EventHandler(beeMoveTimer_Tick);

            beeBtn.MouseEnter += new EventHandler(beeBtn_Click);

            beeBtn.Location = beePathPoints[0];
        }
Ejemplo n.º 9
0
 public SlidingPanel(CCMainForm _ccForm) : this()
 {
     this.ccForm = _ccForm;
 }
Ejemplo n.º 10
0
 public WelcomeForm(CCMainForm ccForm)
 {
     InitializeComponent();
     this.ccForm = ccForm;
 }
Ejemplo n.º 11
0
        } // end CCButton()

        /// <summary>
        /// Construct a CCButton given the CCToolbar it will go on.
        /// </summary>
        /// <param name="ccToolbar"></param>
        public CCButton(CCToolbar ccToolbar) : this()
        {
            this.ccToolbar  = ccToolbar;
            this.ccMainForm = ccToolbar.CCMainForm; // shortcut
        }
Ejemplo n.º 12
0
 public void SetForm(CCMainForm ccMainForm)
 {
     this.ccMainForm = ccMainForm;
 }