public XingKongMessageBox()
        {
            lbCaption = new XingKongLabel();
            lbTitle   = new XingKongLabel();
            btOk      = new XingKongButton();
            btCancel  = new XingKongButton();
            if (XingKongScreen.IsRunningOnMono())
            {
                btOk.TextXoffset     = -9;
                btCancel.TextXoffset = -9;
            }
            else
            {
                btOk.TextXoffset     = -2;
                btCancel.TextXoffset = -2;
            }
            btOk.Text       = "确定";
            btCancel.Text   = "取消";
            btOk.Width      = 128;
            btOk.Height     = 60;
            btCancel.Width  = 128;
            btCancel.Height = 60;

            btOk.IsChecked     = true;;
            btCancel.IsChecked = false;

            DialogStyle = Style.OkCancel;
        }
Exemple #2
0
        /// <summary>
        /// 使Items项目生效
        /// </summary>
        public void Refresh()
        {
            calculateScope();

            btItems = new List <XingKongButton>();
            for (int i = 0; i < scope; i++)
            {
                XingKongButton bt = new XingKongButton();
                bt.Name      = "button" + i;
                bt.Left      = Left;
                bt.Top       = Top + i * ItemHeight;
                bt.Height    = ItemHeight;
                bt.Width     = width;
                bt.FontSize  = FontSize;
                bt.TextAlign = XingKongScreen.TextAlign.Left;
                bt.IsChecked = false;
                btItems.Add(bt);
            }
        }