예제 #1
0
 /// <summary>
 ///
 /// </summary>
 private void pCheckAndSubmitTableAttr(TableViewEventArgs inTableAttr)
 {
     if (!_tableAttrSubmitted && (MessageBox.Show(TextManager.Instance.SubmitTableAttrText(), TextManager.Instance.TitleText(), MessageBoxButtons.YesNo) == DialogResult.Yes))
     {
         pSubmitTableAttr(inTableAttr);
     }
 }
예제 #2
0
파일: CanvasManager.cs 프로젝트: radtek/Pos
 // Invoke the TableViewChanged event; called whenever both the position and the size of a tableview change
 protected virtual void OnTableViewSelected(TableViewEventArgs e)
 {
     if (TableViewSelected != null)
     {
         TableViewSelected(this, e);
     }
 }
예제 #3
0
        /// <summary>
        /// This fuction is called from the TableViewSelecting event only.
        /// It will submit the table view attributes' values
        /// </summary>
        private void pSubmitTableAttr(TableViewEventArgs inTableAttr)
        {
            inTableAttr.TableView.Caption = tbTableName.Text;
            inTableAttr.TableNumber       = Convert.ToInt16(tbTableNumber.Text);
            inTableAttr.TableView.Left    = Convert.ToInt16(tbTableX.Text);
            inTableAttr.TableView.Top     = Convert.ToInt16(tbTableY.Text);
            inTableAttr.TableView.Width   = Convert.ToInt16(tbTableWidth.Text);
            inTableAttr.TableView.Height  = Convert.ToInt16(tbTableHeight.Text);

            pUpdateSelTablePos(Convert.ToInt16(tbTableX.Text), Convert.ToInt16(tbTableY.Text));

            pSetTableAttrSubmitted(true);
        }
예제 #4
0
파일: CanvasManager.cs 프로젝트: radtek/Pos
        /// <summary>
        /// pUpdateSelectedTable is called everytime the TableViewSelecting event needs to be triggered
        /// It triggers the OnTableViewSelecting event, then updates the selected TableInfo
        /// </summary>
        private void pUpdateSelectedTable()
        {
            if (Location.SelectedTable != null)
            {
                TableView          tv          = pTableViewWithTable(Location.SelectedTable);
                TableViewEventArgs tvEventArgs = new TableViewEventArgs(tv, Location.SelectedTable.Number);

                OnTableViewSelecting(tvEventArgs);

                scaleTable(Canvas, Location, Location.SelectedTable, tv);

                Location.SelectedTable.Name   = tvEventArgs.TableView.Caption;
                Location.SelectedTable.Number = tvEventArgs.TableNumber;
            }
        }
예제 #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CanvasTableViewSelected(object sender, TableViewEventArgs e)
 {
     pShowTableViewAttr(e.TableView, e.TableNumber);
 }
예제 #6
0
 /// <summary>
 /// This event is triggered just before a TableView is selected.
 /// Allows for any action before a TableView is selected e.g save the attributes
 /// of the previous selected TableView.
 /// The attributes in the e paramater correspond to the previous selected TableView
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CanvasTableViewSelecting(object sender, TableViewEventArgs e)
 {
     pCheckAndSubmitTableAttr(e);
 }
예제 #7
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CanvasTableViewChanged(object sender, TableViewEventArgs e)
 {
     pShowTableViewAttr(e.TableView, e.TableNumber);
     pSetEditorSaved(false);
 }