Exemple #1
0
        //public static select GetSelectDom(string name_dom_object, OptionList ListItems, string selected_option_value = null, bool input_readonly = false, bool required = false, bool groups_only = true, bool groups_clickable = true) => GetSelectDom(name_dom_object, ListItems, new string[] { selected_option_value }, input_readonly, required);
        public static select GetSelectDom(string name_dom_object, OptionList ListItems, string[] selected_option_values = null, bool input_readonly = false, bool required = false, bool groups_only = true, bool groups_clickable = true)
        {
            select ret_select = new select()
            {
                Name_DOM = name_dom_object
            };

            if (selected_option_values is null)
            {
                selected_option_values = new string[] { "0" };
                ListItems.ListItems.Insert(0, new DataTreeItem()
                {
                    Disabled = true, Tag = "элемент-заглушка", Title = "Выбор значения...", Tooltip = "Выберете значение", Value = "0"
                });
            }
            WriteSelectDom(ref ret_select.Childs, ListItems.ListItems, selected_option_values, groups_only, groups_clickable);

            if (required)
            {
                ret_select.SetAttribute("required", null);
            }

            if (input_readonly)
            {
                ret_select.CustomAttributes.Add("readonly", null);
            }

            return(ret_select);
        }
Exemple #2
0
    public Menu()
    {
        //*************************************************************
        // set SBO_Application with an initialized application object
        //*************************************************************

        //³s½u
        SetApplication();

        //load menu
        SubMain.LoadXML("delmenu.xml");
        //SubMain.LoadXML("addmenu.xml");
        //SubMain.LoadXML("addmenu.xml");

        //¥ý±¾,¥ý¶]
        SubMain.SBO_Application.MenuEvent += new SAPbouiCOM._IApplicationEvents_MenuEventEventHandler(SBO_MenuEvent);
        SubMain.SBO_Application.ItemEvent += new SAPbouiCOM._IApplicationEvents_ItemEventEventHandler(SBO_ItemEvent);
        SubMain.SBO_Application.AppEvent  += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_AppEvent);

        //fdoc fdoc = new fdoc();

        select f17 = new select();
        //f22 f1 = new f22();
        //f2 f2 = new f2();
        //f2 f2222 = new f2();
        //s22 f22 = new s22();
        //frm2          f3 = new frm2();
        //fdoc f4 = new fdoc();

        //s17 f5 = new s17();
    }
Exemple #3
0
 public void onClickSelectDifficulty()
 {
     current = select.Difficulty;
     nextBtn[2].SetActive(false);
     nextBtn[3].SetActive(true);
     canvas.GetComponent <Animator>().SetTrigger("select_difficulty");
 }
        public static div GetBootstrapSelectList(string label, select select_body, string Tooltip = null, string wrap_class = "input-group mb-4 col-auto")
        {
            div ret_dom = new div();

            ret_dom.AddCSS(wrap_class, true);
            if (!string.IsNullOrEmpty(label))
            {
                using (div input_group_prepend = new div())
                {
                    input_group_prepend.AddCSS("input-group-prepend");
                    ret_dom.AddDomNode(input_group_prepend);
                }
                //ret_dom.Childs[0].Childs.Add(new label(label, select_body.Id_DOM) { css_class = "input-group-text" });
            }
            select_body.AddCSS("custom-select");

            if (!string.IsNullOrEmpty(Tooltip))
            {
                ret_dom.title = Tooltip;
            }

            ret_dom.SetAttribute("data-toggle", "tooltip");
            ret_dom.AddDomNode(select_body);
            return(ret_dom);
        }
Exemple #5
0
 // Start is called before the first frame update
 void Start()
 {
     sel           = GameObject.Find("selectTable").GetComponent <select>();
     moveState     = 0;
     finalPos      = new Vector3(placement[count], 1, 0);
     finalWorldPos = new Vector3(worldPlacement[count], 1, 0);
 }
Exemple #6
0
 public void onClickSelectStage()
 {
     current = select.Stage;
     nextBtn[0].SetActive(false);
     nextBtn[1].SetActive(false);
     nextBtn[2].SetActive(true);
     canvas.GetComponent <Animator>().SetTrigger("select_stage");
 }
 void Awake()
 {
     parrent = GameObject.Find("Players");
     resources = GameObject.Find("Handeler").GetComponent<Resources>();
     selected = GameObject.Find("Handeler").GetComponent<Selected>();
     gridDrag = GameObject.Find("Handeler").GetComponent<GridDrag>();
     Select = GameObject.Find("Handeler").GetComponent<select>();
 }
Exemple #8
0
 /// <summary>
 /// Конструктор
 /// </summary>
 /// <param name="property">Вероятность</param>
 /// <param name="name">Название</param>
 /// <param name="dep">Глубина</param>
 public Situation(double property, string name, int dep)
 {
     depth         = dep;
     this.property = property;
     Name          = name;
     this.down     = new List <Situation>();
     this.sel      = select.OR;
 }
Exemple #9
0
 public void onClickSelectEnemy()
 {
     current = select.Enemy;
     //cam.transform.position = Vector3.Lerp(cam.transform.position, camPos.position, Time.deltaTime);
     //cam.transform.rotation = Quaternion.Slerp(cam.transform.rotation, camPos.rotation, Time.deltaTime);
     canvas.GetComponent <Animator>().SetTrigger("select_enemy");
     nextBtn[0].SetActive(false);
     nextBtn[1].SetActive(true);
 }
Exemple #10
0
 // Start is called before the first frame update
 void Start()
 {
     //foregroundShoulder = GameObject.Find("foregroundShoulder").transform;
     //backgroundShoulder = GameObject.Find("backgroundShoulder").transform;
     //look = GetComponent<look>();
     select     = GameObject.FindObjectOfType <select>().GetComponent <select>();
     pickaxeHit = toolManager.effectsContainer.GetChild(0).GetComponent <ParticleSystem>();
     pickaxeHit.gameObject.SetActive(true);
 }
Exemple #11
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                textBox_search.Text = "";
                //get value from combobox - store as t1
                string t1  = "";
                select sl1 = comboBox1.SelectedItem as select;
                t1 = Convert.ToString(sl1.Value);

                listView1.Items.Clear();
                listView1.Columns.Clear();

                using var con = new SQLiteConnection(mydatabase);
                con.Open();
                using var cmd = new SQLiteCommand(con)
                      {
                          CommandText = "SELECT * from cheats ORDER BY " + t1 + ""
                      };

                SQLiteDataReader sqReader = cmd.ExecuteReader();

                listView1.View = View.Details;
                listView1.Columns.Add("Name");
                listView1.Columns.Add("Title ID");
                listView1.Columns.Add("Build ID");
                //listView1.Columns.Add("ID");

                while (sqReader.Read())
                {
                    string listname    = (sqReader.GetString(1));
                    string listtitleid = (sqReader.GetString(2));
                    string listbuild   = (sqReader.GetString(3));
                    string listcheat   = (sqReader.GetString(4));
                    string listnotes   = (sqReader.GetString(5));
                    int    listid      = (sqReader.GetInt32(0));
                    string id          = listid.ToString();
                    listView1.Items.Add(new ListViewItem(new string[] { listname, listtitleid, listbuild, listcheat, listnotes, id }));
                }

                listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
                listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);

                data_amount();

                con.Close();
            }

            catch (Exception error)
            {
                MessageBox.Show("Error is: " + error.Message);
            }
        }
Exemple #12
0
        public SelectMenu(string Label, select my_select)
        {
            if (!string.IsNullOrEmpty(Label))
            {
                LabelSelectMenu = new label(Label, my_select.Id_DOM);
            }

            tag_custom_name = typeof(div).Name;
            AddCSS("form-group");
            Select = my_select;
            Select.AddCSS("form-control");
        }
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                //get value from combobox - store as t1
                string t1  = "";
                select sl1 = comboBox1.SelectedItem as select;
                t1 = Convert.ToString(sl1.Value);

                listView1.Items.Clear();
                listView1.Columns.Clear();

                using var con = new SQLiteConnection(mydatabase);
                con.Open();
                using var cmd   = new SQLiteCommand(con);
                cmd.CommandText = "SELECT * from links ORDER BY " + t1 + "";

                SQLiteDataReader sqReader = cmd.ExecuteReader();

                listView1.View = View.Details;
                listView1.Columns.Add("Name");
                listView1.Columns.Add("Link");
                //listView1.Columns.Add("ID");

                //listView1.Columns[0].Width = 100;
                //listView1.Columns[1].Width = 430;

                while (sqReader.Read())
                {
                    string listitems = (sqReader.GetString(1));
                    string listurl   = (sqReader.GetString(2));
                    string listabout = (sqReader.GetString(3)); //1 for names 2 for url 3 for about
                    int    listid    = (sqReader.GetInt32(0));
                    string id        = listid.ToString();
                    listView1.Items.Add(new ListViewItem(new string[] { listitems, listurl, id, listabout }));
                }

                con.Close();

                listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
                listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            }

            catch (Exception error)
            {
                MessageBox.Show("Error is: " + error.Message);
            }
        }
Exemple #14
0
    void Start()
    {
        if (isTest)
        {
            tmpNewGame();
        }
        LoadData();
        setDataToPanel();
        setBtnNext();
        cam    = GameObject.Find("Main Camera");
        canvas = GameObject.Find("Canvas");

        current = select.Character;
        stage   = maps[0];

        CostumeSetting();
    }
        private string GetScript()
        {
            return(@$ "
                    declare @mainCode nvarchar(10) = @UserCode, 
		                    @notMainCode nvarchar(10),
		                    @fullName nvarchar(max),
		                    @mainId int,
		                    @notMainId int

                    select @fullName = Full_Name from People
                    where Person_Code = @mainCode

                    select @notMainCode = Person_Code from People
                    where Full_Name = @fullName and Person_Code != @mainCode

                    select @mainId = Person_ID from People
                    where Person_Code = @mainCode
                    select @notMainId = Person_ID from People
                    where Person_Code = @notMainCode

                    select @mainCode as MainCode, @notMainCode as NotMainCode, @fullName as FullName, @mainId as MainId, @notMainId as NotMainId

                    update RegForms_Headers
                    set Person_ID = @mainId
                    where Person_ID = @notMainId
                    update Pending_RegForms_Headers
                    set Person_ID = @mainId
                    where Person_ID = @notMainId
                    update Mail_Delivery
                    set Person_ID = @mainId
                    where Person_ID = @notMainId
                    update LearningCourses
                    set Person_ID = @mainId
                    where Person_ID = @notMainId
                    update People_Photos
                    set Person_ID = @mainId
                    where Person_ID = @notMainId

                    delete from People_Contacts
                    where Person_ID = @notMainId
                    delete from People
                    where Person_ID = @notMainId
                    ");
        }
Exemple #16
0
        private void textBox1_MouseClick(object sender, MouseEventArgs e)
        {
            AskForm af = new AskForm();

            af.ShowDialog();
            select sel = af.sel;

            TextBox tb  = sender as TextBox;
            Label   lbl = new Label
            {
                Top  = tb.Top + dy,
                Left = tb.Left
            };

            sits2[tb].sel = sel;

            lbl.Text = sel == select.AND ? "AND" : "OR";

            sits.Add(lbl, sits2[tb]);
            lbl.Click += label1_Click;
            this.Controls.Add(lbl);
        }
Exemple #17
0
        /// <summary>
        /// 新建自动分类窗口
        /// </summary>
        /// <param name="type">分类标准</param>
        /// <param name="select">窗口对象</param>
        /// <param name="lv">被分类列表</param>
        /// <param name="protect">最小分类数量</param>
        public void NewList(BuildListType type, select select, ListView lv, int protect)
        {
            int num = 0;

            switch (type)
            {
            case BuildListType.Artist: num = 3; break;

            case BuildListType.FileType: num = 2; break;

            case BuildListType.Path: num = 6; break;

            case BuildListType.Country:
            {
                select.Show();
                Dictionary <int, ListViewItem> selectdic2 = new Dictionary <int, ListViewItem>();
                Dictionary <int, string>       langdic    = new Dictionary <int, string>();
                int j = 0;
                foreach (ListViewItem lvi in lv.Items)
                {
                    Detector detector = DetectorFactory.create();
                    try
                    {
                        detector.append(lvi.SubItems[0].Text);
                        langdic.Add(j, detector.detect());
                    }
                    catch (LanguageDetect.LangDetectException) { }
                    selectdic2.Add(j, lvi);
                    j++;
                }
                for (int x = 0; x < lv.Items.Count; x++)
                {
                    int    tempnum  = 0;
                    string tempname = null;
                    Dictionary <int, ListViewItem> itemdic = new Dictionary <int, ListViewItem>();
                    if (langdic.ContainsKey(x))
                    {
                        int selectindex = 0;
                        for (int y = x; y < lv.Items.Count; y++)
                        {
                            if (langdic.ContainsKey(y))
                            {
                                if (langdic[x] == langdic[y])
                                {
                                    tempnum++;
                                    tempname = langdic[x];
                                    itemdic.Add(selectindex, selectdic2[y]);
                                    if (x != y)
                                    {
                                        langdic.Remove(y);
                                    }
                                    selectindex++;
                                }
                            }
                        }
                    }
                    if (tempnum > 0)
                    {
                        switch (tempname)
                        {
                        case "th": tempname = "泰语"; break;

                        case "fi": tempname = "芬兰语"; break;

                        case "fr": tempname = "法语"; break;

                        case "it": tempname = "意大利语"; break;

                        case "ru": tempname = "俄语"; break;

                        case "es": tempname = "西班牙语"; break;

                        case "ja": tempname = "日语"; break;

                        case "en": tempname = "英语"; break;

                        case "ko": tempname = "韩语"; break;

                        case "zh-cn": tempname = "中文(简)"; break;

                        case "zh-tw": tempname = "中文(繁)"; break;
                        }
                        TabPage tpage = new TabPage();
                        tpage.Text = tempname;
                        tpage.Name = "New List " + Data.selectlist;
                        ListView lv2 = new ListView();
                        lv2.Name = "List" + Data.selectlist;
                        lv2.Columns.Add("标题", 150, HorizontalAlignment.Center);
                        lv2.Columns.Add("长度(秒)", 65, HorizontalAlignment.Center);
                        lv2.Columns.Add("路径", 260, HorizontalAlignment.Center);
                        lv2.View               = System.Windows.Forms.View.Details;
                        lv2.FullRowSelect      = true;
                        lv2.MultiSelect        = true;
                        lv2.GridLines          = true;
                        lv2.AllowColumnReorder = true;
                        lv2.Dock               = DockStyle.Fill;
                        lv2.Location           = new System.Drawing.Point(0, 0);
                        tpage.Controls.Add(lv2);
                        select.SelectControl.TabPages.Add(tpage);
                        lv2.BeginUpdate();           //数据更新,UI暂时挂起,直到EndUpdate绘制控件,可以有效避免闪烁并大大提高加载速度
                        for (int k = 0; k < tempnum; k++)
                        {
                            ListViewItem lvi = new ListViewItem();
                            lvi.Text = itemdic[k].SubItems[0].Text;                     //标题
                            lvi.SubItems.Add(itemdic[k].SubItems[1].Text);              //长度
                            lvi.SubItems.Add(itemdic[k].SubItems[6].Text.Remove(0, 9)); //路径
                            lv2.Items.Add(lvi);
                        }
                        lv2.EndUpdate();
                    }
                }
                return;

                break;
            }
            }
            select.Show();
            Dictionary <int, ListViewItem> selectdic = new Dictionary <int, ListViewItem>();
            int i = 0;

            foreach (ListViewItem lvi in lv.Items)
            {
                selectdic.Add(i, lvi);
                i++;
            }
            for (int x = 0; x < lv.Items.Count; x++)
            {
                int    tempnum  = 0;
                string tempname = null;
                Dictionary <int, ListViewItem> itemdic = new Dictionary <int, ListViewItem>();
                if (selectdic.ContainsKey(x))
                {
                    int selectindex = 0;
                    for (int y = x; y < lv.Items.Count; y++)
                    {
                        if (selectdic.ContainsKey(y))
                        {
                            if (num == 6)
                            {
                                string[] index  = selectdic[x].SubItems[num].Text.Split(new char[] { '\\' });
                                string[] index2 = selectdic[y].SubItems[num].Text.Split(new char[] { '\\' });
                                if (index[index.Length - 2] == index2[index2.Length - 2])
                                {
                                    tempnum++;
                                    tempname = index2[index2.Length - 2];
                                    itemdic.Add(selectindex, selectdic[y]);
                                    if (x != y)
                                    {
                                        selectdic.Remove(y);
                                    }
                                    selectindex++;
                                }
                            }
                            else
                            {
                                string[] index  = selectdic[x].SubItems[num].Text.Split(new char[] { '\\' });
                                string[] index2 = selectdic[y].SubItems[num].Text.Split(new char[] { '\\' });
                                if (selectdic[x].SubItems[num].Text == selectdic[y].SubItems[num].Text)
                                {
                                    tempnum++;
                                    tempname = selectdic[y].SubItems[num].Text;
                                    itemdic.Add(selectindex, selectdic[y]);
                                    if (x != y)
                                    {
                                        selectdic.Remove(y);
                                    }
                                    selectindex++;
                                }
                            }
                        }
                    }
                }
                if (tempnum > protect)
                {
                    if (tempname == "")
                    {
                        tempname = "Unknown";
                    }
                    TabPage tpage = new TabPage();
                    tpage.Text = tempname;
                    tpage.Name = "New List " + Data.selectlist;
                    ListView lv1 = new ListView();
                    lv1.Name = "List" + Data.selectlist;
                    lv1.Columns.Add("标题", 150, HorizontalAlignment.Center);
                    lv1.Columns.Add("长度(秒)", 65, HorizontalAlignment.Center);
                    lv1.Columns.Add("路径", 260, HorizontalAlignment.Center);
                    lv1.View               = System.Windows.Forms.View.Details;
                    lv1.FullRowSelect      = true;
                    lv1.MultiSelect        = true;
                    lv1.GridLines          = true;
                    lv1.AllowColumnReorder = true;
                    lv1.Dock               = DockStyle.Fill;
                    lv1.Location           = new System.Drawing.Point(0, 0);
                    tpage.Controls.Add(lv1);
                    select.SelectControl.TabPages.Add(tpage);
                    lv1.BeginUpdate();
                    for (int j = 0; j < tempnum; j++)
                    {
                        ListViewItem lvi = new ListViewItem();
                        lvi.Text = itemdic[j].SubItems[0].Text;                     //标题
                        lvi.SubItems.Add(itemdic[j].SubItems[1].Text);              //长度
                        lvi.SubItems.Add(itemdic[j].SubItems[6].Text.Remove(0, 9)); //路径
                        lv1.Items.Add(lvi);
                    }
                    lv1.EndUpdate();
                }
            }
        }
Exemple #18
0
 private void button2_Click(object sender, EventArgs e)
 {
     sel = select.OR;
     this.Close();
 }
join (select msg, testJoinField from #RepPackPackageToConsume2 where testJoinField != 'BBB') tt on o.config = tt.testJoinField"
Exemple #20
0
        private void button1_Click(object sender, EventArgs e)
        {
            select sel = new select();

            sel.Show();
        }
Exemple #21
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            select sl1 = comboBox1.SelectedItem as select;

            t1.Text = Convert.ToString(sl1.Value);
        }
Exemple #22
0
 // Use this for initialization
 void Awake()
 {
     selects = this;
     this.gameObject.SetActive(false);
 }