コード例 #1
0
 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)
     {
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        public void ClickFirstRowTable()
        {
            TableController table = mapping["Таблица"] as TableController;

            table?.ClickFirstRow();
        }
コード例 #4
0
        public void ClickRowTable(string value)
        {
            TableController table = mapping["Таблица"] as TableController;

            table?.Click(value);
        }
コード例 #5
0
ファイル: formController.cs プロジェクト: evreich/WBS
        public void ClickAddInTable(string tableName)
        {
            TableController table = mapping[tableName] as TableController;

            table?.ClickAdd();
        }
コード例 #6
0
 public DataBase(TableController tableController)
 {
     TableController = tableController;
 }
 public MainPageViewModel()
 {
     TableController = TableController.Instance;
 }
コード例 #8
0
        public void CheckTableContainsByName(string value, string tableName)
        {
            TableController table = mapping[tableName] as TableController;

            table?.CheckTableContains(value);
        }
 public GamesPageViewModel()
 {
     TableController = TableController.Instance;
 }
コード例 #10
0
 public mainForm()
 {
     InitializeComponent();
     tableController = new TableController();
 }
コード例 #11
0
    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();
            }
        }
    }
コード例 #12
0
ファイル: formController.cs プロジェクト: evreich/WBS
        public void ClickFirstRowTable(string tableName)
        {
            TableController table = mapping[tableName] as TableController;

            table?.ClickFirstRow();
        }
コード例 #13
0
ファイル: formController.cs プロジェクト: evreich/WBS
        public void ClickRowTable(string tableName, string value)
        {
            TableController table = mapping[tableName] as TableController;

            table?.Click(value);
        }
コード例 #14
0
ファイル: formController.cs プロジェクト: evreich/WBS
        public bool PrevPage(string tableName)
        {
            TableController table = mapping[tableName] as TableController;

            return(table.PrevPage(tableName));
        }
コード例 #15
0
ファイル: formController.cs プロジェクト: evreich/WBS
        public void ShowCountsOfElements(string tableName, int count)
        {
            TableController table = mapping[tableName] as TableController;

            table?.ShowCountsOfElements(count);
        }
コード例 #16
0
        public List <string> GetListFieldValues(string field, int maxPageNum = 0)
        {
            TableController table = mapping["Таблица"] as TableController;

            return(table?.GetListFieldValues(field, maxPageNum));
        }
コード例 #17
0
        public void SortColumn(string column, bool setUp = true)
        {
            TableController table = mapping["Таблица"] as TableController;

            table?.SortColumn(column, setUp);
        }
コード例 #18
0
ファイル: MemoryCard.cs プロジェクト: IvanKelber/memorycard
 public void SetController(TableController controller)
 {
     this.controller = controller;
 }
コード例 #19
0
 public ConnectionPageViewModel()
 {
     TableController = TableController.Instance;
 }
 public void TestInitialize()
 {
     this._controller = ControllerFactory.GetTableController();
 }
コード例 #21
0
ファイル: TableBuilder.cs プロジェクト: s1vh/TetrisTeam
 // Set up references
 void Awake()
 {
     tableController = this.gameObject.GetComponent <TableController>();
 }
コード例 #22
0
ファイル: Table.cs プロジェクト: TotoCafe/TotoCafe
    /// <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(); }
    }
コード例 #23
0
ファイル: Table.cs プロジェクト: TotoCafe/TotoCafe
    /// <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;
    }
コード例 #24
0
        public void CheckTablenNotContains(string value)
        {
            TableController table = mapping["Таблица"] as TableController;

            table?.CheckTablenNotContains(value);
        }
コード例 #25
0
 public TableAssemblyWorker()
 {
     dairyController = new TableController<DairyDateItem>();
     dairyItemController = new TableController<DairyListItem>();
 }
コード例 #26
0
ファイル: formController.cs プロジェクト: evreich/WBS
        public void CheckTableContains(string tableName, string column, string value)
        {
            TableController table = mapping[tableName] as TableController;

            table?.CheckTableContainsByColumn(column, value);
        }