コード例 #1
0
        private void InitUI()
        {
            // Initialize Root Object
            _gameUI = new UIContainer(new Vector2f(GlobalConstants.BoardLength * GlobalConstants.SquareSize, 0),
                                      new Vector2f(GlobalConstants.WindowWidth - GlobalConstants.BoardLength * GlobalConstants.SquareSize,
                                                   GlobalConstants.SquareSize * GlobalConstants.BoardLength), new Color(215, 215, 215));

            // Move History
            moveHistory = new MoveHistory(new Vector2f(_gameUI.Position.X, _gameUI.Position.Y + GlobalConstants.SquareSize),
                                          new Vector2f(_gameUI.Shape.Size.X, _gameUI.Shape.Size.Y - (GlobalConstants.SquareSize * 2)));
            // Quit Button
            GraphicButton quitButton = new GraphicButton(
                new Vector2f(_gameUI.Position.X + _gameUI.Shape.Size.X - ButtonWidth, _gameUI.Position.Y + _gameUI.Shape.Size.Y - ButtonHeight),
                new Vector2f(ButtonWidth, ButtonHeight), new Color(100, 100, 100), new Color(150, 150, 150));

            quitButton.SetGraphics(Application.Instance().AssetManager.Textures[TextureID.ReturnIdle],
                                   Application.Instance().AssetManager.Textures[TextureID.ReturnHover]);
            quitButton.SetCommand(new GoToStateCommand(new MenuState()));
            quitButton.SetBorder(1, Color.Black);

            // New Game Button
            GraphicButton newGameButton = new GraphicButton(
                new Vector2f(_gameUI.Position.X + _gameUI.Shape.Size.X - (ButtonWidth * 2), _gameUI.Position.Y + _gameUI.Shape.Size.Y - ButtonHeight),
                new Vector2f(ButtonWidth, ButtonHeight), new Color(100, 100, 100), new Color(150, 150, 150));

            newGameButton.SetGraphics(Application.Instance().AssetManager.Textures[TextureID.NewGameIdle],
                                      Application.Instance().AssetManager.Textures[TextureID.NewGameHover]);
            newGameButton.SetCommand(new ResetGameCommand(this));
            newGameButton.SetBorder(1, Color.Black);

            // Add Elements
            _gameUI.AddElement(moveHistory);
            _gameUI.AddElement(quitButton);
            _gameUI.AddElement(newGameButton);
        }
コード例 #2
0
        public ProjectCRUDPanel() : base(new Point(20, 140), new Size(820, 430), "ProjectCRUD", false)
        {
            // background
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.CRUDpanel.png"));

            // build the tree view
            // obtain the data from the server
            TEMPOServerProxy tsp = TEMPO.RequestBroker.TEMPOServerProxy.Instance;
            ProjectDS        ds  = tsp.GetProjectsList();

            ctv = new CRUDTreeViewDS("Projects", ds, "ProjectName");
            ctv.onCRUDItemClicked += new CRUDTreeViewDS.CRUDItemClickedDelegate(openEntity);

            ctv.Location = new Point(32, 71);
            ctv.Size     = new Size(306, 222);

            this.Controls.Add(ctv);

            entrypanel                     = new ProjectCRUDEntryPanel(ProjectCRUDEntryPanel.EntryType.Save);
            entrypanel.Visible             = false;
            entrypanel.onRecordMaintained += new ProjectCRUDEntryPanel.RecordMaintainDelegate(refreshList);
            this.Controls.Add(entrypanel);

            createpanel                     = new ProjectCRUDEntryPanel(ProjectCRUDEntryPanel.EntryType.Create);
            createpanel.Visible             = false;
            createpanel.onRecordMaintained += new ProjectCRUDEntryPanel.RecordMaintainDelegate(refreshList);
            this.Controls.Add(createpanel);

            create = new GraphicButton(new Point(180, 315), new Size(155, 28));
            create.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.addnewdocument.png"));
            create.Click += new System.EventHandler(newRecord);
            this.Controls.Add(create);
        }
コード例 #3
0
        public SearchResultLineItemPanel() : base(new Point(0, 0), new Size(385, 28), "SearchResultLineItemPanel", true)
        {
            //background
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchresultitempanel.png"));

            // Employee
            _employee           = new Label();
            _employee.BackColor = System.Drawing.Color.White;
            _employee.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(40, 7), _employee, false, false, SubPanel.std_fontsize);

            // Status
            _status           = new Label();
            _status.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);;
            _status.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(209, 7), _status, false, false, SubPanel.std_fontsize);


            // Period Ending
            _periodending           = new Label();
            _periodending.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            _periodending.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(302, 7), _periodending, false, false, SubPanel.std_fontsize);

            // action item
            folder = new GraphicButton(new Point(6, 6), new Size(19, 16));
            folder.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.folderclosed.png"));
            folder.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.folderopen.png"));
            folder.Click += new EventHandler(OpenReport);
            this.Controls.Add(folder);
        }
コード例 #4
0
ファイル: TimeSheetNotesForm.cs プロジェクト: craiggib/Tempo
        public TimeSheetNotesForm(TimeSheetDS.TimeSheetRow tsrow)
        {
            InitializeComponent();

            _timesheetrow = tsrow;

            // build up the User Interface
            this.BackgroundImage = new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.modalwindow.png");
            this.ClientSize      = new System.Drawing.Size(374, 254);

            m_save = new GraphicButton(new Point(282, 208), new Size(59, 15));
            m_save.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.savebutton.png"));
            m_save.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.savebutton-over.png"));
            m_save.Click += new System.EventHandler(m_save_Click);
            this.Controls.Add(m_save);

            // assign the form icon
            this.Icon = new Icon(typeof(TEMPO.Client.MainScreen), "Resources.trayicon.ico");

            // populate the text box with the info
            if (_timesheetrow.IsNotesNull())
            {
                m_notes.Text = "";
            }
            else
            {
                m_notes.Text = _timesheetrow.Notes;
            }
        }
コード例 #5
0
        public RPT_EmployeeTimeSummary() : base(new Point(20, 140), new Size(820, 430), "RPT_EmployeeTimeSummary", false)
        {
            // background
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.timesummarybyemp.png"));

            // From Date
            Label temp = new Label();

            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(46, 132), temp, "111", true, false, SubPanel.std_fontsize);

            // From Value
            frompicker        = new DateTimePicker();
            frompicker.Size   = new Size(130, 20);
            frompicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            this.addControl(new Point(147, 131), frompicker, false, false, SubPanel.std_fontsize);

            // To Date
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(46, 172), temp, "112", true, false, SubPanel.std_fontsize);

            // To Value
            topicker        = new DateTimePicker();
            topicker.Size   = new Size(130, 20);
            topicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            this.addControl(new Point(147, 173), topicker, false, false, SubPanel.std_fontsize);

            // employee list
            employees               = new ComboBox();
            employees.Size          = new Size(130, 120);
            employees.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.addControl(new Point(147, 211), employees, false, false, SubPanel.std_fontsize);
            employees.DataSource    = RequestBroker.TEMPOServerProxy.Instance.GetAllEmployees().Employee;
            employees.DisplayMember = "EmployeeName";
            employees.ValueMember   = "EmpID";

            // Employee Label
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(46, 213), temp, "113", true, false, SubPanel.std_fontsize);

            // the search button
            search = new GraphicButton(new Point(716, 386), new Size(59, 15));
            search.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchbutton.png"));
            search.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchbutton-over.png"));
            this.Controls.Add(search);
            search.Click += new System.EventHandler(GenerateReport);

            // report preview
            PictureBox preview = new PictureBox();

            preview.Image    = new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.timesummarypreview.png");
            preview.Location = new Point(371, 124);
            preview.Size     = new Size(400, 162);
            this.Controls.Add(preview);
        }
コード例 #6
0
 void GraphicButton_ShowButtonToolTip(GraphicButton GB)
 {
     if (GB.Hint != "" && TextToolTipShow.Text != GB.Hint)
     {
         TextToolTipShow.Text    = GB.Hint;
         TextToolTipShow.Visible = true;
     }
 }
コード例 #7
0
 void GraphicButton_LeaveButton(GraphicButton GB)
 {
     if (!progressBeinFlag)
     {
         labelTitle.Text    = "";
         labelTitle.Visible = false;
     }
 }
コード例 #8
0
        public RPT_ProjectTimeSummary()  : base(new Point(20, 140), new Size(820, 430), "RPT_ProjectTimeSummary", false)
        {
            // background
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.timesummarybyproject.png"));

            // From Date
            Label temp = new Label();

            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(46, 125), temp, "118", true, false, SubPanel.std_fontsize);

            // From Value
            frompicker        = new DateTimePicker();
            frompicker.Size   = new Size(130, 20);
            frompicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            this.addControl(new Point(147, 123), frompicker, false, false, SubPanel.std_fontsize);

            // To Date
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(46, 165), temp, "119", true, false, SubPanel.std_fontsize);

            // To Value
            topicker        = new DateTimePicker();
            topicker.Size   = new Size(130, 20);
            topicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            this.addControl(new Point(147, 163), topicker, false, false, SubPanel.std_fontsize);

            // project Label
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(46, 206), temp, "120", true, false, SubPanel.std_fontsize);

            // project list
            projects               = new ComboBox();
            projects.Size          = new Size(130, 120);
            projects.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.addControl(new Point(147, 203), projects, false, false, SubPanel.std_fontsize);
            projects.DataSource    = RequestBroker.TEMPOServerProxy.Instance.GetProjectsList().Project;
            projects.DisplayMember = "ProjectName";
            projects.ValueMember   = "ProjectID";
            projects.Width         = 250;


            // the search button
            search = new GraphicButton(new Point(716, 386), new Size(59, 15));
            search.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchbutton.png"));
            search.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchbutton-over.png"));
            this.Controls.Add(search);
            search.Click += new System.EventHandler(GenerateReport);
        }
コード例 #9
0
        void GraphicButton_ShowButtonToolTip(GraphicButton GB)
        {
            if (!progressBeinFlag && GB.Hint != "" && labelTitle.Text != GB.Hint)
            {
                Graphics g      = labelTitle.CreateGraphics();
                int      strLen = (int)(g.MeasureString(GB.Hint, labelTitle.Font).Width + 0.5) + 4;
                labelTitle.Width = strLen;

                labelTitle.Left      = panelProgress.Padding.Left;
                labelTitle.Text      = GB.Hint;
                labelTitle.TextAlign = ContentAlignment.MiddleLeft;
                labelTitle.Visible   = true;
                g.Dispose();
            }
        }
コード例 #10
0
ファイル: ApproveTimeSheets.cs プロジェクト: craiggib/Tempo
        public ApproveTimeSheets() : base(new Point(20, 140), new Size(820, 430), "ApproveTimeSheets", false)
        {
            // background
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.approvetimesheetspanel.png"));

            // subbmited time sheets
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(43, 57), temp, "94", true, false, SubPanel.std_fontsize);

            // add the timesheets combo box
            submitted_timesheets               = new ComboBox();
            submitted_timesheets.Size          = new Size(165, 20);
            submitted_timesheets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.addControl(new Point(215, 53), submitted_timesheets, false, false, SubPanel.std_fontsize);
            submitted_timesheets.Width = 230;

            // open button
            open = new GraphicButton(new Point(460, 55), new Size(61, 17));
            open.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.tsopen.png"));
            open.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.tsopenover.png"));
            open.Click += new System.EventHandler(OpenTimeSheet);
            this.Controls.Add(open);

            // notes buton
            notes = new GraphicButton(new Point(37, 387), new Size(59, 15));
            notes.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.notesbutton.png"));
            notes.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.notesbutton-over.png"));
            notes.Visible = false;
            notes.Click  += new System.EventHandler(OpenNotes);
            this.Controls.Add(notes);

            // save buton
            save = new GraphicButton(new Point(698, 387), new Size(59, 15));
            save.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.savebutton.png"));
            save.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.savebutton-over.png"));
            save.Click  += new System.EventHandler(saveTimeSheet);
            save.Visible = false;
            this.Controls.Add(save);

            loadSubmittedTimeSheets();

            // build the time entry panel
            TimeEntry         = new AP_TimeEntryPanel();
            TimeEntry.Visible = false;
            this.Controls.Add(TimeEntry);
        }
コード例 #11
0
 void GraphicButton_LeaveButton(GraphicButton GB)
 {
     TextToolTipShow.Text    = "";
     TextToolTipShow.Visible = false;
 }
コード例 #12
0
        public TimeEntryPanel() : base(new Point(24, 109), new Size(771, 268), "TimeEntry", false)
        {
            // UI init
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.timeentrypanel.png"));

            // add row button
            addrow = new GraphicButton(new Point(12, 239), new Size(27, 19));
            addrow.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.addrowbutton.png"));
            addrow.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.addrowbutton-over.png"));
            addrow.Click += new System.EventHandler(addRowClick);
            this.Controls.Add(addrow);

            // add entry
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(50, 241), temp, "5", true, false, SubPanel.std_fontsize);

            // status
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(393, 241), temp, "6", true, false, SubPanel.std_fontsize);

            // total
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(625, 241), temp, "7", true, false, SubPanel.std_fontsize);

            days = new Label[7];

            // days of the week - Sunday
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(376, 11), temp, "8", true, false, SubPanel.std_fontsize);
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.Yellow;
            temp.Size      = new Size(20, 15);
            this.addControl(new Point(384, 11), temp, true, false, SubPanel.std_fontsize);
            days[0] = temp;

            // days of the week - Monday
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(418, 11), temp, "9", true, false, SubPanel.std_fontsize);
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.Yellow;
            temp.Size      = new Size(20, 15);
            this.addControl(new Point(426, 11), temp, true, false, SubPanel.std_fontsize);
            days[1] = temp;

            // days of the week - Tuesday
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(466, 11), temp, "10", true, false, SubPanel.std_fontsize);
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.Yellow;
            temp.Size      = new Size(20, 15);
            this.addControl(new Point(474, 11), temp, true, false, SubPanel.std_fontsize);
            days[2] = temp;

            // days of the week - Wednesday
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(514, 11), temp, "11", true, false, SubPanel.std_fontsize);
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.Yellow;
            temp.Size      = new Size(20, 15);
            this.addControl(new Point(522, 11), temp, true, false, SubPanel.std_fontsize);
            days[3] = temp;

            // days of the week - Thursday
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(558, 11), temp, "12", true, false, SubPanel.std_fontsize);
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.Yellow;
            temp.Size      = new Size(20, 15);
            this.addControl(new Point(566, 11), temp, true, false, SubPanel.std_fontsize);
            days[4] = temp;

            // days of the week - Saturday
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(602, 11), temp, "13", true, false, SubPanel.std_fontsize);
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.Yellow;
            temp.Size      = new Size(20, 15);
            this.addControl(new Point(610, 11), temp, true, false, SubPanel.std_fontsize);
            days[5] = temp;

            // days of the week - Sunday
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(648, 11), temp, "14", true, false, SubPanel.std_fontsize);
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.Yellow;
            temp.Size      = new Size(20, 15);
            this.addControl(new Point(656, 11), temp, true, false, SubPanel.std_fontsize);
            days[6] = temp;

            // add the status combo box
            status               = new ComboBox();
            status.Size          = new Size(145, 20);
            status.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.addControl(new Point(450, 238), status, false, false, SubPanel.std_fontsize);

            // total time label
            totaltime           = new Label();
            totaltime.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            this.Controls.Add(totaltime);
            totaltime.Font     = new Font(SubPanel.std_fontname, SubPanel.std_fontsize);
            totaltime.Location = new Point(685, 241);
            totaltime.Size     = new Size(36, 16);

            // fullname label
            fullname           = new Label();
            fullname.BackColor = System.Drawing.Color.FromArgb(199, 184, 173);
            fullname.ForeColor = System.Drawing.Color.FromArgb(110, 70, 58);
            this.addLabel(new Point(13, 9), fullname, true, false, 12);;
        }
コード例 #13
0
        public TimeSheetsPanel() : base(new Point(20, 140), new Size(920, 430), "TimeSheets", false)
        {
            // background
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.timesheetspanel.png"));

            // add the icon to the background panel
            PictureBox icon = new PictureBox();

            icon.Image    = new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.timesheeticon.png");
            icon.Location = new Point(652, 11);
            icon.Size     = new Size(136, 36);
            this.Controls.Add(icon);

            // add the timesheets combo box
            current_timesheets               = new ComboBox();
            current_timesheets.Size          = new Size(165, 20);
            current_timesheets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.addControl(new Point(155, 53), current_timesheets, false, false, SubPanel.std_fontsize);

            // notes buton
            notes = new GraphicButton(new Point(37, 387), new Size(59, 15));
            notes.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.notesbutton.png"));
            notes.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.notesbutton-over.png"));
            notes.Click += new System.EventHandler(openNotes);
            this.Controls.Add(notes);

            // remove timesheet buton
            remove = new GraphicButton(new Point(106, 387), new Size(118, 15));
            remove.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.removetimesheetbutton.png"));
            remove.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.removetimesheetbutton-over.png"));
            remove.Click += new System.EventHandler(RemoveTimeSheet);
            this.Controls.Add(remove);

            // save buton
            save = new GraphicButton(new Point(698, 387), new Size(59, 15));
            save.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.savebutton.png"));
            save.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.savebutton-over.png"));
            save.Click += new System.EventHandler(saveTimeSheet);
            this.Controls.Add(save);

            // open button
            open = new GraphicButton(new Point(327, 55), new Size(61, 17));
            open.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.tsopen.png"));
            open.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.tsopenover.png"));
            open.Click += new System.EventHandler(OpenTimeSheet);
            this.Controls.Add(open);

            // create button
            create = new GraphicButton(new Point(400, 55), new Size(61, 17));
            create.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.tsnew.png"));
            create.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.tsnewover.png"));
            create.Click += new System.EventHandler(createTimeSheet);
            this.Controls.Add(create);

            // saved time sheets
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(172, 149, 142);
            temp.ForeColor = System.Drawing.Color.White;
            this.addLabel(new Point(43, 57), temp, "4", true, false, SubPanel.std_fontsize);

            // load the saved timesheets
            loadSavedTimeSheets();

            hideTimeSheetButtons();

            // build the time entry panel
            TimeEntry         = new TimeEntryPanel();
            TimeEntry.Visible = false;
            this.Controls.Add(TimeEntry);
        }
コード例 #14
0
ファイル: LineItem.cs プロジェクト: craiggib/Tempo
        private void UserInterfaceInitialization()
        {
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.lineitementrypanel.png"));

            //removerow button
            removerow = new GraphicButton(new Point(2, 3), new Size(27, 19));
            removerow.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.removerowbutton.png"));
            removerow.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.removerowbutton-over.png"));
            removerow.Click += new System.EventHandler(removeRowClick);
            this.Controls.Add(removerow);

            // Client Label Removed April 19, 2004 as per Client Request
            // client text box
//			client = new Label();
//			client.Size = new System.Drawing.Size(130, 21);
//			client.BackColor = System.Drawing.Color.FromArgb(221,212,206);
//			this.Controls.Add(client);
//			client.Location = new Point(162,2);
//			client.Font = new Font(SubPanel.std_fontname, SubPanel.std_fontsize);

            // project combo box
            _project = new ComboBox();
            this.addControl(new Point(32, 2), _project, false, false, SubPanel.std_fontsize);
            _project.Size          = new System.Drawing.Size(130, 21);
            _project.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            _project.Width         = 240;


            //worktype combo box
            _worktype = new ComboBox();
            this.addControl(new Point(280, 2), _worktype, false, false, SubPanel.std_fontsize);
            _worktype.Size          = new System.Drawing.Size(70, 21);
            _worktype.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            _worktype.Width         = 80;

            // total label
            lbl_total           = new Label();
            lbl_total.BackColor = System.Drawing.Color.FromArgb(199, 184, 173);
            this.addLabel(new Point(680, 7), lbl_total, false, false, SubPanel.std_fontsize);

            // days
            sun            = new TextBox();
            sun.Tag        = 0;
            sun.Size       = new Size(40, 21);
            sun.Validated += new System.EventHandler(timeEntryChange);
            this.addControl(new Point(365, 2), sun, false, false, SubPanel.std_fontsize);


            mon            = new TextBox();
            mon.Tag        = 1;
            mon.Size       = new Size(40, 21);
            mon.Validated += new System.EventHandler(timeEntryChange);
            this.addControl(new Point(409, 2), mon, false, false, SubPanel.std_fontsize);


            tue            = new TextBox();
            tue.Tag        = 2;
            tue.Size       = new Size(40, 21);
            tue.Validated += new System.EventHandler(timeEntryChange);
            this.addControl(new Point(453, 2), tue, false, false, SubPanel.std_fontsize);

            wed            = new TextBox();
            wed.Tag        = 3;
            wed.Size       = new Size(40, 21);
            wed.Validated += new System.EventHandler(timeEntryChange);
            this.addControl(new Point(497, 2), wed, false, false, SubPanel.std_fontsize);

            thu            = new TextBox();
            thu.Tag        = 4;
            thu.Size       = new Size(40, 21);
            thu.Validated += new System.EventHandler(timeEntryChange);
            this.addControl(new Point(541, 2), thu, false, false, SubPanel.std_fontsize);

            fri            = new TextBox();
            fri.Tag        = 5;
            fri.Size       = new Size(40, 21);
            fri.Validated += new System.EventHandler(timeEntryChange);
            this.addControl(new Point(585, 2), fri, false, false, SubPanel.std_fontsize);

            sat            = new TextBox();
            sat.Tag        = 6;
            sat.Size       = new Size(40, 21);
            sat.Validated += new System.EventHandler(timeEntryChange);
            this.addControl(new Point(629, 2), sat, false, false, SubPanel.std_fontsize);

            // add the listeners for the combo boxes
            _project.SelectedValueChanged += new System.EventHandler(projectChange);
        }
コード例 #15
0
        public ApproveTimeSheetSearch() : base(new Point(20, 140), new Size(820, 430), "ApprovedTimeSheetSearch", false)
        {
            // background
            this.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.approvedsearchpanel.png"));

            // add the icon
            PictureBox icon = new PictureBox();

            icon.Image    = new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchpanelicon.png");
            icon.Location = new Point(640, 0);
            icon.Size     = new Size(162, 50);
            this.Controls.Add(icon);

            // Employee
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(40, 80), temp, "24", true, false, SubPanel.std_fontsize);

            // Employee Value
            employee           = new Label();
            employee.BackColor = System.Drawing.Color.FromArgb(221, 212, 206);
            employee.ForeColor = System.Drawing.Color.FromArgb(170, 168, 166);
            employee.Location  = new Point(148, 80);
            Font f = new Font(SubPanel.std_fontname, SubPanel.std_fontsize);

            f             = new Font(f, f.Style | FontStyle.Italic);
            f             = new Font(f, f.Style | FontStyle.Bold);
            employee.Font = f;
            employee.Size = new Size(135, 21);
            this.Controls.Add(employee);


            // Status
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(40, 118), temp, "25", true, false, SubPanel.std_fontsize);

            // Status Value
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(221, 212, 206);
            temp.ForeColor = System.Drawing.Color.FromArgb(170, 168, 166);
            this.addLabel(new Point(148, 118), temp, "28", true, true, SubPanel.std_fontsize);

            // From Date
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(40, 158), temp, "26", true, false, SubPanel.std_fontsize);

            // From Value
            frompicker        = new DateTimePicker();
            frompicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            frompicker.Size   = new Size(130, 20);
            this.addControl(new Point(148, 156), frompicker, false, false, SubPanel.std_fontsize);

            // To Date
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(40, 198), temp, "27", true, false, SubPanel.std_fontsize);

            // To Value
            topicker        = new DateTimePicker();
            topicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
            topicker.Size   = new Size(130, 20);
            this.addControl(new Point(148, 196), topicker, false, false, SubPanel.std_fontsize);

            // Employee Result
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(373, 78), temp, "24", true, false, SubPanel.std_fontsize);

            // Status Result
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(541, 78), temp, "25", true, false, SubPanel.std_fontsize);

            // PE Result
            temp           = new Label();
            temp.BackColor = System.Drawing.Color.FromArgb(205, 191, 187);
            temp.ForeColor = System.Drawing.Color.FromArgb(88, 43, 30);
            this.addLabel(new Point(635, 78), temp, "29", true, false, SubPanel.std_fontsize);

            search = new GraphicButton(new Point(240, 367), new Size(59, 15));
            search.setGraphic(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchbutton.png"));
            search.setOverGraphicState(new Bitmap(typeof(TEMPO.Client.MainScreen), "Resources.searchbutton-over.png"));
            this.Controls.Add(search);
            search.Click += new System.EventHandler(onSearch);

            // build the result panel
            // don't display it to the user yet
            _resultpanel = new SearchResultsPanel();
            this.Controls.Add(_resultpanel);
            _resultpanel.Visible = false;

            // populate the search parameters
            PopulateSearchParameters();
        }