Exemple #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);
     }
 }
Exemple #2
0
 // 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);
     }
 }
Exemple #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);
        }
Exemple #4
0
        /// <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;
            }
        }
Exemple #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CanvasTableViewSelected(object sender, TableViewEventArgs e)
 {
     pShowTableViewAttr(e.TableView, e.TableNumber);
 }
Exemple #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);
 }
Exemple #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);
 }