protected void btnAcceptClick(object sender, EventArgs e) { Button btn = (Button)sender; int id = int.Parse(btn.ID.Replace("_Accept", "")); try { TableController controller = new TableController(); Table table = cmp.GetTableWithId(id); table.ActiveController = controller; } catch (Exception) { } }
private void GridWindow_Loaded(object sender, RoutedEventArgs e) { var fixture = new TableFixture(); var table = (ITable) fixture["Add"].ToStructure(null); var leaf = new StepLeaf(); leaf.AddParts( new Step().With("w:1,x:2,y:3"), new Step().With("w:2,x:3,y:4"), new Step().With("w:5,x:6,y:7"), new Step().With("w:6,x:7,y:8"), new Step().With("w:7,x:8,y:9") ); var controller = new TableController(grid); controller.Start(table, leaf); }
public void ClickFirstRowTable() { TableController table = mapping["Таблица"] as TableController; table?.ClickFirstRow(); }
public void ClickRowTable(string value) { TableController table = mapping["Таблица"] as TableController; table?.Click(value); }
public void ClickAddInTable(string tableName) { TableController table = mapping[tableName] as TableController; table?.ClickAdd(); }
public DataBase(TableController tableController) { TableController = tableController; }
public MainPageViewModel() { TableController = TableController.Instance; }
public void CheckTableContainsByName(string value, string tableName) { TableController table = mapping[tableName] as TableController; table?.CheckTableContains(value); }
public GamesPageViewModel() { TableController = TableController.Instance; }
public mainForm() { InitializeComponent(); tableController = new TableController(); }
void Update() { if (IsInActionRadius() == true) { Vector3 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition); Vector2 mousePos2D = new Vector2(mousePos.x, mousePos.y); RaycastHit2D[] hits = Physics2D.RaycastAll(mousePos2D, Vector2.zero); if (hits.Length == 0) { isdetected = false; } foreach (var hit in hits) { //Debug.Log(hit.collider.name); if (hit.collider.tag == "table") { TableController tableController = hit.collider.GetComponent <TableController>(); isdetected = true; Vector2 tooltipPosition = Camera.main.WorldToScreenPoint(hit.collider.transform.position); if (IsCurrentHandEmpty() && IsObjectExist(hits, Global.DROPED_ITEM_PREFIX, false) == false) { ShowToolTip((tableController.tableName == string.Empty) ? "table" : tableController.tableName, PrintRed(Global.Tooltip.NO_ACTIONS)); } else if (IsCurrentHandEmpty() && IsObjectExist(hits, Global.DROPED_ITEM_PREFIX, false) == true) { ShowToolTip((tableController.tableName == string.Empty) ? "table" : tableController.tableName, Global.Tooltip.LM_PICK_UP); } else if (IsCurrentHandEmpty() == false && IsObjectExist(hits, Global.DROPED_ITEM_PREFIX, false) == true) { ShowToolTip((tableController.tableName == string.Empty) ? "table" : tableController.tableName, Global.Tooltip.LM_PUT + ((tableController.isCraftTable) ? " / " + Global.Tooltip.RM_CRAFT : string.Empty)); } else { ShowToolTip((tableController.tableName == string.Empty) ? "table" : tableController.tableName, Global.Tooltip.LM_PUT); } TooltipLocate(tooltipPosition); return; } else if (hit.collider.name.Contains(Global.DROPED_ITEM_PREFIX)) { bool onTable = false; foreach (var hitTable in hits) { if (hitTable.collider.tag == "table") { onTable = true; } } if (onTable == false) { Item item = hit.collider.GetComponent <ItemCell>().item; isdetected = true; Vector2 tooltipPosition = Camera.main.WorldToScreenPoint(hit.collider.transform.position); ShowToolTip(item.itemName, (controller.IsEmpty(controller.currentHand) == true) ? Global.Tooltip.LM_PICK_UP : PrintRed(Global.Tooltip.NO_ACTIONS)); TooltipLocate(tooltipPosition); return; } } else if (hit.collider.tag == "case") { CaseController caseController = hit.collider.GetComponent <CaseController>(); isdetected = true; Vector2 tooltipPosition = Camera.main.WorldToScreenPoint(hit.collider.transform.position); ShowToolTip((caseController.caseName == string.Empty) ? "case" : caseController.caseName, (caseController.isOpen == false) ? Global.Tooltip.LM_OPEN : Global.Tooltip.LM_CLOSE); TooltipLocate(tooltipPosition); return; } else if (hit.collider.tag == "tv") { TVController tvController = hit.collider.GetComponent <TVController>(); isdetected = true; Vector2 tooltipPosition = Camera.main.WorldToScreenPoint(hit.collider.transform.position); ShowToolTip("tv", (tvController.IsTvOpen() == false) ? Global.Tooltip.LM_TURN_ON : Global.Tooltip.LM_TURN_OFF + " / " + Global.Tooltip.RM_NEXT_CHANNEL); TooltipLocate(tooltipPosition); return; } else { isdetected = false; } } if (isTooltipOpen == true && isdetected == false) { HideToolTip(); } } else { if (isTooltipOpen == true) { HideToolTip(); } } }
public void ClickFirstRowTable(string tableName) { TableController table = mapping[tableName] as TableController; table?.ClickFirstRow(); }
public void ClickRowTable(string tableName, string value) { TableController table = mapping[tableName] as TableController; table?.Click(value); }
public bool PrevPage(string tableName) { TableController table = mapping[tableName] as TableController; return(table.PrevPage(tableName)); }
public void ShowCountsOfElements(string tableName, int count) { TableController table = mapping[tableName] as TableController; table?.ShowCountsOfElements(count); }
public List <string> GetListFieldValues(string field, int maxPageNum = 0) { TableController table = mapping["Таблица"] as TableController; return(table?.GetListFieldValues(field, maxPageNum)); }
public void SortColumn(string column, bool setUp = true) { TableController table = mapping["Таблица"] as TableController; table?.SortColumn(column, setUp); }
public void SetController(TableController controller) { this.controller = controller; }
public ConnectionPageViewModel() { TableController = TableController.Instance; }
public void TestInitialize() { this._controller = ControllerFactory.GetTableController(); }
// Set up references void Awake() { tableController = this.gameObject.GetComponent <TableController>(); }
/// <summary> /// Initializes active controller when company first login. /// This gives us company can see the current view even it logs out and in again and again. /// </summary> public void InitActiveController() { SqlConnection conn = new SqlConnection( ConfigurationManager.ConnectionStrings["TotoCafeDB"].ConnectionString ); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SELECT ControllerID, CostumerID, TableID, StartDateTime " + "FROM TableController " + "WHERE (TableID = @TableID) AND (FinishDateTime IS NULL)"; cmd.Parameters.AddWithValue("@TableID", this.TableID); cmd.Connection = conn; try { conn.Open(); SqlDataReader dr = cmd.ExecuteReader(); dr.Read();//Must be only one record. TableController tc = new TableController(); tc.ControllerID = int.Parse(dr["ControllerID"].ToString()); tc.CostumerID = int.Parse(dr["CostumerID"].ToString()); tc.TableID = int.Parse(dr["TableID"].ToString()); DateTime t; DateTime.TryParse(dr["StartDateTime"].ToString(), out t); tc.StartDateTime = t; this.ActiveController = tc; } catch (Exception) { } finally { conn.Close(); } }
/// <summary> /// Inserts a record into TableController table and sets the controller object /// to the table's active controller. This means this table is active until the payment /// </summary> /// <param name="CostumerID"></param> public void StartTableForCostumer(int CostumerID) { TableController tc = new TableController(); tc.TableID = this.TableID; tc.CostumerID = CostumerID; tc.StartDateTime = DateTime.Now; tc.Insert(); this.ActiveController = tc; }
public void CheckTablenNotContains(string value) { TableController table = mapping["Таблица"] as TableController; table?.CheckTablenNotContains(value); }
public TableAssemblyWorker() { dairyController = new TableController<DairyDateItem>(); dairyItemController = new TableController<DairyListItem>(); }
public void CheckTableContains(string tableName, string column, string value) { TableController table = mapping[tableName] as TableController; table?.CheckTableContainsByColumn(column, value); }