private void HistoriesForm_Load(object sender, EventArgs e)
        {
            //設定panInput 的 radius
            RadiusTool rt = new RadiusTool();

            rt.SetControlRadius(panInput, 50);
        }
Exemple #2
0
        private void ContactsForm_Load(object sender, EventArgs e)
        {
            RadiusTool rt = new RadiusTool();

            rt.SetControlRadius(panInText, 50);

            ShowAllData(); //顯示全部聯絡資訊
        }
        /*--- 建立新表 ------------------
         *
         *- 參數1: 問事表標籤
         *- 參數2: AskingTable物件
         *-----------------------------*/
        public AskingTablesForm(IconButton tableLabel, AskingTable table)
        {
            InitializeComponent();
            InitAskingTableView();
            this.tableLabel = tableLabel;
            this.table      = table;

            /*- 設定報名列的輸入框圓角 -*/
            RadiusTool rt = new RadiusTool();

            rt.SetControlRadius(panInput, 45);
        }
        public BrowseTablesForm(AskingTable askingTable)
        {
            InitializeComponent();
            this.askingTable = askingTable;

            /*--- 設定元件的Radius ---*/
            RadiusTool rt = new RadiusTool();

            rt.SetControlRadius(panInput, 50);

            /*--- 顯示全部問事表 ---*/
            ShowAllTables();
        }
Exemple #5
0
        private void NewTableForm_Load(object sender, EventArgs e)
        {
            FormFunction.SetFormLocation(this);

            /*--- 設定元件的Radius ---*/
            rt.SetControlRadius(btnSelectPlace, 16);

            /*--- 建立 PlaceList ---*/
            CreatePlaceList();

            /*--- 從資料庫撈出『地點名稱』,並加到 ListBox『placeList』中 ---*/
            using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.connectStr))
            {
                string     sqlStr = "select 地點名稱 from Asking_Place";
                SqlCommand cmd    = new SqlCommand(sqlStr, cn);
                cn.Open();
                SqlDataReader dr = cmd.ExecuteReader();

                while (dr.Read())
                {
                    dataCount++; //幾筆資料
                    placeList.Items.Add(dr["地點名稱"]);
                }
                dr.Close();
            }

            /*--- 動態繪製 placeList的高度 ---*/
            if (dataCount > 6)
            {
                placeList.Size = new Size(135, 26 * 6);
            }
            else
            {
                placeList.Size = new Size(135, 26 * dataCount);
            }

            rt.SetControlRadius(placeList, 16);
        }
        /*--- 開啟舊表 -----------------
         *
         *- 參數1: 問事表標籤
         *- 參數2: AskingTable物件
         *- 參數3: 問事表名稱
         *-----------------------------*/
        public AskingTablesForm(IconButton tableLabel, AskingTable table, string tableName)
        {
            InitializeComponent();
            InitAskingTableView();
            this.tableLabel     = tableLabel;
            this.table          = table;
            isSaved_askingTable = true; //問事表資料已儲存

            /*- 設定報名列的輸入框圓角 -*/
            RadiusTool rt = new RadiusTool();

            rt.SetControlRadius(panInput, 45);

            ShowAskingContents(tableName); //顯示問事資料

            /*- 顯示姓名、聯絡電話 -*/
            for (int i = 0; i < personalInfo_list.Count; i++)
            {
                string contactNum = personalInfo_list[i][0];         //取得聯絡編號
                string name       = ShowPersonalInfo(contactNum, i); //取得姓名
                personalInfo_list[i][1] = name;
            }
        }