示例#1
0
        private void RoutesBoxList_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int index = this.RoutesBoxList.IndexFromPoint(e.Location);
            if (index != System.Windows.Forms.ListBox.NoMatches)
            {
                if (RoutesBoxList.SelectedItem != null)
                {
                    try
                    {
                        int a = RoutesBoxList.SelectedIndex;
                        Route r = rts.getRoutebyId(a);
                        Edit edit = new Edit(rts, a, r.getLevel(), r.getExpand(), r.getLeaf(), r.getCateg(), r.getId(), r.getParentId(), r.getFtWeight(), r.getFtWeight2(), r.getFtWeight3(), r.getFtWeight4(), r.getFtWeight5(), r.getFtWeight6(), r.getFtWeight7(), r.getMap(), r.getDetails());

                        edit.ShowDialog();
                    }
                    catch (Exception b)
                    {
                        MessageBox.Show(b.ToString());
                    }
                }
            }
        }
示例#2
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (RoutesBoxList.SelectedItem != null)
            {
                try
                {
                    int a = RoutesBoxList.SelectedIndex;
                    Route r = rts.getRoutebyId(a);
                    Edit edit = new Edit(rts, a, r.getLevel(), r.getExpand(), r.getLeaf(), r.getCateg(), r.getId(), r.getParentId(), r.getFtWeight(), r.getFtWeight2(), r.getFtWeight3(), r.getFtWeight4(), r.getFtWeight5(), r.getFtWeight6(), r.getFtWeight7(), r.getMap(), r.getDetails());

                    edit.ShowDialog();
                }
                catch (Exception b)
                {
                    MessageBox.Show(b.ToString());
                }
            }
            else
            {
                MessageBox.Show("Nothing Selected", "Error");
            }
        }