示例#1
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            TFTLabel label = new TFTLabel(10, 10, 0, 0, TFTCan);

            label.Text = "Test Hallo";
            TFTCan.RedrawControls();
        }
示例#2
0
        private void lvControls_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (lvControls.SelectedItems.Count > 0)
            {
                string     control = lvControls.SelectedItems[0].Text;
                TFTControl con     = null;
                if (control == "Button")
                {
                    con = new TFTButton(10, 10, 100, 50, TFTCan);
                    TFTCan.RedrawControls();
                }
                else if (control == "Label")
                {
                    con = new TFTLabel(10, 10, 100, 50, TFTCan);
                    TFTCan.RedrawControls();
                }
                else if (control == "Rectangle")
                {
                    con = new TFTRectangle(10, 10, 100, 50, TFTCan);
                    TFTCan.RedrawControls();
                }

                if (con != null)
                {
                    LoadProperties(con);
                    selected = con;
                }
            }
        }