Exemple #1
0
    void ToolBar1_ButtonClick(object sender, EventArgs e)
    {
        Btn btn = sender as Btn;

        switch (btn.ID)
        {
        case NamesOfBtn.New:
        case NamesOfBtn.Save:
        case NamesOfBtn.SaveAndNew:
            this.Save();
            break;

        case NamesOfBtn.SaveAndClose:
            this.Save();
            this.WinClose();
            break;

        case NamesOfBtn.Delete:
            BP.En.Entities dtls = this.HisEns;
            QueryObject    qo   = new QueryObject(dtls);
            qo.DoQuery(dtls.GetNewEntity.PK, BP.SystemConfig.PageSize, this.PageIdx, false);
            string msg1 = "";
            foreach (BP.En.Entity dtl in dtls)
            {
                CheckBox cb = this.ucsys1.GetCBByID("IDX_" + dtl.PKVal);
                if (cb == null)
                {
                    continue;
                }
                try
                {
                    if (cb.Checked)
                    {
                        dtl.Delete();
                    }
                }
                catch (Exception ex)
                {
                    msg1 += "@删除期间错误:" + ex.Message;
                }
            }

            if (msg1 != "")
            {
                this.Alert(msg1);
            }

            this.ucsys1.Clear();
            this.Bind();
            break;

        case NamesOfBtn.Excel:
            this.ExpExcel();
            break;

        default:
            BP.PubClass.Alert("当前版本不支持此功能。");
            break;
        }
    }
        public void getForm()
        {
            int  offsetY = 30, offsetX = 10;
            Form f = new Form();

            f.Height       = 150; f.Width = 400; f.WindowState = FormWindowState.Normal; f.Text = "Смещение"; f.StartPosition = FormStartPosition.CenterScreen;
            f.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; f.AutoSize = true;
            System.Drawing.Point insPt = new System.Drawing.Point(5, 5);
            InterfaceDll.Lbl     lbs   = new Lbl(offsetX, offsetY, 100, 15, insPt, f, "Дистанция");
            InterfaceDll.CB      cbs   = new CB(offsetX, offsetY, 200, 15, insPt, f);
            cbs.position(lbs.last(), true);
            //cbs.last().Items.AddRange(new[] { "2.65", "2.8", "3", "4.5", "6" });
            ComponentOccurrence occ = ss[1] as ComponentOccurrence;

            if (occ == null)
            {
                return;
            }
            ins = occ.Constraints[1] as InsertConstraint;
            if (ins == null)
            {
                return;
            }


            cbs.last().Text       = last(ins.Distance);
            InterfaceDll.Btn btns = new Btn(offsetX, offsetY, 100, 20, insPt, f, click, "Добавить");
            btns.center(cbs.last(), offsetY + 5);
            f.Show();
        }
Exemple #3
0
        void btn_Click(object sender, EventArgs e)
        {
            GroupField en = new GroupField(this.RefOID);

            en.Lab = this.Pub1.GetTBByID("TB_Lab_" + en.OID).Text;
            en.Update();

            Btn btn = sender as Btn;

            switch (btn.ID)
            {
            case "Btn_SaveAndClose":
                this.WinClose();
                break;

            case "Btn_NewField":
                this.Session["GroupField"] = this.RefOID;
                this.Response.Redirect("Do.aspx?DoType=AddF&MyPK=" + this.RefNo + "&GroupField=" + this.RefOID, true);
                break;

            case "Btn_CopyField":
                this.Response.Redirect("CopyFieldFromNode.aspx?FK_Node=" + this.RefNo + "&GroupField=" + this.RefOID, true);
                break;

            default:
                this.Response.Redirect("GroupField.aspx?RefNo=" + this.RefNo + "&RefOID=" + this.RefOID, true);
                break;
            }
        }
 public void timeManagement(Btn btnSelected)
 {
     if (btnSelected)
     {
         if (btnSelected.tag.Equals(tagTime.removeTime.ToString()))
         {
             if (timeChoice > 0)
             {
                 timeChoice -= 1;
             }
         }
         else if (btnSelected.tag.Equals(tagTime.addTime.ToString()))
         {
             timeChoice += 1;
         }
         else if (btnSelected.tag.Equals(tagTime.applyTime.ToString()))
         {
             timeElapsed = timeChoice;
             updateTimeElapsed();
             inGameDate        = DateTime.Now;
             resourceFrequency = DateTime.Now;
             timeChoice        = 0;
         }
     }
 }
Exemple #5
0
 public void CloseWindow(RandomEvent Event, GameObject Button)
 {
     YesNoButtons.Add(Button);
     gameObject.SetActive(false);
     gamestate = GameStates.GlobalMap;
     EventWindow.SetActive(false);
     foreach (GameObject Btn in YesNoButtons)
     {
         Btn.SetActive(false);
         Destroy(Button);
     }
     YesNoButtons.Clear();
     if (Event.LaunchNextEvent == true)
     {
         foreach (RandomEvent ev in AllEvents)
         {
             if (ev.type == Event.NextEvent)
             {
                 Event.LaunchNextEvent = false;
                 LaunchEvent(ev);
                 break;
             }
         }
     }
     UpdateResources();
 }
 public void RemoveCheckbox()
 {
     if (Btn.Text.Equals("Remove"))
     {
         Btn.Click();
     }
 }
 public void AddCheckbox()
 {
     if (Btn.Text.Equals("Add"))
     {
         Btn.Click();
     }
 }
Exemple #8
0
 private void AddTo(Btn <T> node, T value)
 {
     if (value.CompareTo(node.Value) < 0)
     {
         if (node.Left == null)
         {
             node.Left = new Btn <T>(value);
         }
         else
         {
             AddTo(node.Left, value);
         }
     }
     else
     {
         if (node.Right == null)
         {
             node.Right = new Btn <T>(value);
         }
         else
         {
             AddTo(node.Right, value);
         }
     }
 }
Exemple #9
0
        void BindLogin()
        {
            this.Pub1.AddFieldSet("委托接口功能测试");

            Label lbl_Login_No = new Label();

            lbl_Login_No.Text = "输入登录帐号:";
            lbl_Login_No.ID   = "lbl_Login_No";
            this.Pub1.Add(lbl_Login_No);

            TB TB_WebUser_No = new TB();

            TB_WebUser_No.ID    = "TB_WebUser_No";
            TB_WebUser_No.Width = 100;
            this.Pub1.Add(TB_WebUser_No);

            Btn btn_Loin = new Btn();

            btn_Loin.ID     = "btn_Title_Flow_WorkID";
            btn_Loin.Text   = "登录";
            btn_Loin.Width  = 45;
            btn_Loin.Click += new EventHandler(btn_Loin_Click);
            this.Pub1.Add(btn_Loin);
            this.Pub1.AddFieldSetEnd();
        }
Exemple #10
0
        private void addControls(Point defaultSize)
        {
            // The description label
            this.lblDescription      = new Lbl(this.Description, this);
            this.lblDescription.Size = new Size(this.Width - 20, this.lblDescription.Height + 1);

            // The size textboxes
            this.tbWidth       = new Tb(this);
            this.tbWidth.Text  = defaultSize.X.ToString();
            this.tbWidth.Size  = new Size(this.tbWidth.Width / 2, this.tbWidth.Height);
            this.tbHeight      = new Tb(this);
            this.tbHeight.Text = defaultSize.Y.ToString();
            this.tbHeight.Size = this.tbWidth.Size;

            // The Ok and Cancel buttons
            this.btnOk        = new Btn("Ok", this);
            this.btnOk.Click += (o, e) => {
                int number;
                if (!int.TryParse(this.tbWidth.Text, out number) || !int.TryParse(this.tbHeight.Text, out number))
                {
                    MessageBox.Show("Please enter an integer value.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                this.DialogResult = DialogResult.OK;
                this.Close();
            };
            this.btnCancel        = new Btn("Cancel", this);
            this.btnCancel.Click += (o, e) => {
                this.DialogResult = DialogResult.Cancel;
                this.Close();
            };
        }
Exemple #11
0
        public void editBtnInput(Btn btn, Input input, Input newinput)
        {
            int index = this.Definebtns.BtnList.Find((Btn sa) => sa.Name == btn.Name).InputList.FindIndex((Input sa) => sa.Key == input.Key);

            deleteBtnInput(btn, input);
            this.Definebtns.BtnList.Find((Btn sa) => sa.Name == (btn as Btn).Name).InputList.Insert(index, newinput);
        }
Exemple #12
0
        public void BindPass()
        {
            if (WebUser.IsWap)
            {
                this.AddFieldSet("<a href=Home.aspx ><img src='/WF/Img/Home.gif' border=0 >主页</a>-<a href='" + this.PageID + ".aspx'>设置</a>-密码修改");
            }
            else
            {
                this.AddFieldSet("密码修改");
            }

            this.AddBR();

            this.Add("<table border=0 width=80% align=center > ");
            this.AddTR();
            this.AddTDTitle();
            this.AddTDTitle();
            this.AddTREnd();

            this.AddTR();
            this.AddTD("原密码");
            TextBox tb = new TextBox();

            tb.TextMode = TextBoxMode.Password;
            tb.ID       = "TB_Pass1";
            this.AddTD(tb);
            this.AddTREnd();

            this.AddTR();
            this.AddTD("新密码");
            tb          = new TextBox();
            tb.TextMode = TextBoxMode.Password;
            tb.ID       = "TB_Pass2";
            this.AddTD(tb);
            this.AddTREnd();

            this.AddTR();
            this.AddTD("重输新密码");
            tb          = new TextBox();
            tb.TextMode = TextBoxMode.Password;
            tb.ID       = "TB_Pass3";
            this.AddTD(tb);
            this.AddTREnd();


            this.AddTR();
            this.AddTD("");

            Btn btn = new Btn();

            btn.Text   = "确定";
            btn.Click += new EventHandler(btn_Click);
            this.AddTD(btn);
            this.AddTREnd();
            this.AddTableEnd();

            this.AddBR();
            this.AddFieldSetEnd();
        }
Exemple #13
0
        public EditDataControl()
        {
            _grid = new DataGrid();
            Controls.Add(_grid);

            _btnPrevious = new Btn("Previous", this, (o, e) => { ShowUserControl <ParserControl>(); });
            _btnNext     = new Btn("Next", this, OnNextClick);
        }
Exemple #14
0
 private void Keyboard_OnClick(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         Btn.Focus();
         ExeccuteSearch();
     }
 }
Exemple #15
0
 // Use this for initialization
 void Start()
 {
     Anim_Menu     = Menu.GetComponent <Animator>();
     Anim_Btn      = Btn.GetComponent <Animator>();
     Anim_Config   = Config_btn.GetComponent <Animator>();
     Anim_foodBtn  = food_btn.GetComponent <Animator>();
     Anim_foodMenu = Food_Menu.GetComponent <Animator>();
 }
Exemple #16
0
 public void setValue(Btn btn)
 {
     this.txt_name.Text       = btn.Name;
     this.txt_desc.Text       = btn.Desc;
     this.txt_type.Text       = btn.Type;
     this.txt_execuser.Text   = btn.Execuser;
     this.txt_filename.Text   = btn.Filename;
     this.txt_install.Checked = btn.Install;
 }
Exemple #17
0
 public MainWindowViewModel()
 {
     Mediator    = new Mediator();
     TBoxFN      = new TBox(Mediator, MessageType.Input);
     TBoxLN      = new TBox(Mediator, MessageType.Input);
     TBoxEmail   = new TBox(Mediator, MessageType.Input);
     TBoxAge     = new TBox(Mediator, MessageType.Input);
     RegisterBtn = new Btn(Mediator);
 }
Exemple #18
0
        public void setValue(Btn btn)
        {
            this._name         = btn.Name;
            this.btn_desc.Text = btn.Desc;
            this._type         = btn.Type;
            this._filename     = btn.Filename;

            this._install = btn.Install;
        }
Exemple #19
0
        private void BtnByProduct_Click(object sender, EventArgs e)
        {
            Btn         btn    = (Btn)sender;
            Order       order  = btn.Order;
            AssignOrder window = new AssignOrder(order);

            window.Show();
            this.Close();
        }
Exemple #20
0
        private void BPToolBar1_ButtonClick(object sender, System.EventArgs e)
        {
            Btn btn = (Btn)sender;

            switch (btn.ID)
            {
            case NamesOfBtn.SelectNone:
                //this.CBL1.SelectNone();
                break;

            case NamesOfBtn.SelectAll:
                //this.CBL1.SelectAll();
                break;

            case NamesOfBtn.Save:
                if (this.IsTreeShowWay)
                {
                    SaveTree();
                }
                else
                {
                    Save();
                }

                string str = this.Request.RawUrl;
                if (str.Contains("ShowWay="))
                {
                    str = str.Replace("&ShowWay=", "&1=");
                }
                this.Response.Redirect(str + "&ShowWay=" + this.DDL_Group.SelectedItem.Value, true);
                return;

            case "Btn_SaveAndClose":
                if (this.IsTreeShowWay)
                {
                    SaveTree();
                }
                else
                {
                    Save();
                }
                this.WinClose();
                break;

            case "Btn_Close":
                this.WinClose();
                break;

            case "Btn_EditMEns":
                this.EditMEns();
                break;

            default:
                throw new Exception("@没有找到" + btn.ID);
            }
        }
Exemple #21
0
        public void AdminSet()
        {
            this.AddFieldSet("系统设置");

            this.AddTable();
            this.AddTR();
            this.AddTDTitle("项目");
            this.AddTDTitle("项目值");
            this.AddTDTitle("描述");
            this.AddTREnd();


            this.AddTR();
            this.AddTD("标题图片");
            FileUpload fu = new FileUpload();

            fu.ID = "F";
            this.AddTD(fu);
            this.AddTD("系统顶部的标题图片");
            //   this.AddTDBigDoc("请您自己调整好图片大小,然后把它上传上去。在系统设置里可以控制标题图片是否显示。");
            this.AddTREnd();

            this.AddTR();
            this.AddTD("ftp URL");
            TextBox tb = new TextBox();

            tb.Width = 200;
            tb.ID    = "TB_FtpUrl";
            this.AddTD(tb);
            this.AddTD();
            this.AddTREnd();

            this.AddTR();
            this.AddTD("");

            Btn btn = new Btn();

            btn.Text   = " OK ";
            btn.Click += new EventHandler(btn_AdminSet_Click);
            this.AddTD(btn);
            this.AddTD();
            this.AddTREnd();

            this.AddTR();
            this.AddTD();
            this.AddTD("<a href=\"javascript:WinOpen('/WF/Comm/Sys/EditWebConfig.aspx')\" >System Setting</a>-<a href=\"javascript:WinOpen('../OA/FtpSet.aspx')\" >FTP Services</a>-<a href=\"javascript:WinOpen('/WF/Comm/Ens.aspx?EnsName=BP.OA.Links')\" >Link</a>");
            this.AddTD("");
            //  this.AddTD("<a href=\"javascript:WinOpen('./../WF/ClearDatabase.aspx')\" >" + this.ToE("ClearDB", "清除流程数据") + "</a>");

            this.AddTD();
            this.AddTREnd();

            this.AddTableEnd();

            this.AddFieldSetEnd();
        }
        public void AddBtn(string id)
        {
            Btn btn = new Btn();

            btn.Attributes["class"] = "Btn";
            btn.ID   = id;
            btn.Text = GetTextById(id);

            this.Add(btn);
        }
        private void AddBtn(string id, string label, string clickEvent)
        {
            Btn btn = new Btn();

            btn.ID   = id;
            btn.Text = label;
            btn.Attributes["onclick"] = "return " + clickEvent + "()";
            btn.Attributes["class"]   = "btn";
            divMenu.Controls.Add(btn);
        }
Exemple #24
0
        public void AddBtn(string id, string text)
        {
            Btn en = new Btn();

            en.ID   = id;
            en.Text = text;
            //en.Attributes["class"] = "Btn";            if (id == "Btn_Delete")
            //   en.Attributes["onclick"] = "return confirm('您确定要执行删除吗?');";
            this.Add(en);
        }
Exemple #25
0
        private void btn_exec_Click(object sender, EventArgs e)
        {
            Set set = QuickConfig.Common.setXml.getConfig(ConfigName);

            setConfig setconfig = new setConfig();

            List <Btn> btnList = set.Definebtns.BtnList;

            if (this.Type == "bat")
            {
                string filePath = Common.getToolsFolder() + "\\" + this.Filename + "." + this.Type;

                Btn             btn       = btnList.Find((Btn s) => s.Name == this.Name);
                List <string[]> inputList = new List <string[]>();
                foreach (Input input in btn.InputList)
                {
                    string[] str = new string[2];
                    str[0] = input.Key;
                    str[1] = input.Value;
                    inputList.Add(str);
                }

                setBAT.RunBatByDefine(Common.getToolsFolder(), Common.getToolsTempFolder(), this.Filename, inputList, true);
            }
            else if (this.Type == "sql")
            {
                Btn             btn       = btnList.Find((Btn s) => s.Name == this.Name);
                List <string[]> inputList = new List <string[]>();
                foreach (Input input in btn.InputList)
                {
                    string[] str = new string[2];
                    str[0] = input.Key;
                    str[1] = input.Value;
                    inputList.Add(str);
                }

                string user       = btn.Execuser;
                string password   = "";
                string datasource = set.Db.Datasource;
                if (user == set.Db.DbSystemUser.User)
                {
                    password = set.Db.DbSystemUser.Password;
                }
                else if (set.Db.DbUserList.Find((DbUser dbuser) => dbuser.User == user) != null)
                {
                    password = set.Db.DbUserList.Find((DbUser dbuser) => dbuser.User == user).Password;
                }
                else if (set.Db.DbSdeUserList.Find((DbSdeUser dbsdeuser) => dbsdeuser.User == user) != null)
                {
                    password = set.Db.DbSdeUserList.Find((DbSdeUser dbsdeuser) => dbsdeuser.User == user).Password;
                }

                setBAT.SqlExec(Common.getToolsFolder(), Common.getToolsTempFolder(), user, password, datasource, this.Filename, inputList, true);
            }
        }
Exemple #26
0
        private void addControls()
        {
            this.btnOk        = new Btn("Ok", this);
            this.btnOk.Click += (o, e) => { this.saveAndGoBack(); };

            this.btnCancel        = new Btn("Cancel", this);
            this.btnCancel.Click += (o, e) => { this.ShowLastVisitedUserControl(); };

            this.btnReset        = new Btn("Reset", this);
            this.btnReset.Click += (o, e) => { this.resetDefaults(); };
        }
Exemple #27
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var dblAnim = new DoubleAnimation
            {
                From = 1.0,
                To   = 0.4
            };

            dblAnim.AutoReverse = true;
            Btn.BeginAnimation(Button.OpacityProperty, dblAnim);
        }
Exemple #28
0
        void ToolBar1_ButtonClick(object sender, EventArgs e)
        {
            Btn btn = sender as Btn;

            try
            {
                switch (btn.ID)
                {
                case NamesOfBtn.New:
                case NamesOfBtn.Save:
                case NamesOfBtn.SaveAndNew:
                    this.Save(false);
                    break;

                case NamesOfBtn.SaveAndClose:
                    this.Save(true);
                    break;

                case NamesOfBtn.Delete:
                    Entities    dtls = BP.DA.ClassFactory.GetEns(this.EnsName);
                    QueryObject qo   = new QueryObject(dtls);
                    qo.AddWhere(this.RefKey, this.RefVal);
                    qo.DoQuery("OID", BP.SystemConfig.PageSize, this.PageIdx, false);
                    foreach (Entity dtl in dtls)
                    {
                        CheckBox cb = this.ucsys1.GetCBByID("CB_" + dtl.PKVal);
                        if (cb == null)
                        {
                            continue;
                        }

                        if (cb.Checked)
                        {
                            dtl.Delete();
                        }
                    }
                    this.ucsys1.Clear();
                    this.Bind();
                    break;

                case NamesOfBtn.Excel:
                    this.ExpExcel();
                    break;

                default:
                    BP.PubClass.Alert("当前版本不支持此功能。");
                    break;
                }
            }
            catch (Exception ex)
            {
                this.Alert(ex.Message);
            }
        }
    private void c396b2cb8e50d2a36fe984f811d71fd9b(Btn c2d8a6ba3ff04c35af5dbc5bb5c615b52)
    {
        float?   nullable;
        AudioMgr local1 = SubSystem <AudioMgr> .cfd689ba95cb05e1458adf8457ab37a54;

        c5499aa51b250adfeebe746167715ef8c.cd3d9f33d3ef09712052d53fc1f167e5f(ref nullable);
        bool                     flag1         = local1.SFX.Yes.Play(nullable);
        StateMachine             machine1      = base.caa7e398bd72d0a62a8fa9c93edbb74fa;
        PlaySong_ShowMarketplace stateInstance = State <PlaySong_ShowMarketplace> .cfd689ba95cb05e1458adf8457ab37a54;
        StateBase                base1         = machine1.GotoState(stateInstance);
    }
Exemple #30
0
        public void BindFtpSet()
        {
            this.AddFieldSet("ftp setting");

            this.AddTable();
            this.AddTR();
            this.AddTDTitle();
            this.AddTDTitle();
            this.AddTDTitle();
            this.AddTREnd();

            this.AddTR();
            this.AddTD("用户名");
            TextBox tb = new TextBox();

            tb.ID = "TB_UserNo";
            this.AddTD(tb);
            this.AddTD();
            this.AddTREnd();

            this.AddTR();
            this.AddTD("密码");
            tb          = new TextBox();
            tb.TextMode = TextBoxMode.Password;
            tb.ID       = "TB_Pass1";
            this.AddTD(tb);
            this.AddTD();
            this.AddTREnd();

            //this.AddTR();
            //this.AddTD("重输新密码");
            //tb = new TextBox();
            //tb.TextMode = TextBoxMode.Password;
            //tb.ID = "TB_Pass3";
            //this.AddTD(tb);
            //this.AddTD();
            //this.AddTREnd();


            this.AddTR();
            this.AddTD("");

            Btn btn = new Btn();

            btn.Text   = "确定";
            btn.Click += new EventHandler(btn_Click);
            this.AddTD(btn);
            this.AddTD();
            this.AddTREnd();
            this.AddTableEnd();
            this.AddFieldSetEnd();
        }