public TrainList_OKAdd_Coach_Page(TrainDataAdd_Args_Page _oldpage)
        {
            try
            {
                InitializeComponent();
                AddControl(this);

                Title   = TextManager.Get().Text("addtrainarg");
                IconImg = Image.FromStream(ResourceManager.Get($".\\data\\res\\{OptionManager.Get().ResFolder}\\images.npk", "ico_train.png", 5, 7, 1, 6));

                oldpage = _oldpage;

                ListDraw();

                lbTitle.Font      = new Font(RTCore.Environment.Font, 30);
                lbTitle.Text      = TextManager.Get().Text("okaddcoach");
                lbTitle.ForeColor = ResourceManager.Get("okaddcoach.title");

                panListBack.BackColor = ResourceManager.Get("okaddcoach.list");

                lbAdd.ForeColor = ResourceManager.Get("okaddcoach.add.unsel");
                lbAdd.SelColor  = ResourceManager.Get("okaddcoach.add.sel");

                lbAdd.Font      = new Font(RTCore.Environment.Font, 20);
                lbAdd.Text      = TextManager.Get().Text("add");
                lbAdd.ForeColor = ResourceManager.Get("okaddcoach.add.unsel");
                lbAdd.SelColor  = ResourceManager.Get("okaddcoach.add.sel");
                lbAdd.Location  = new Point(Width - 25 - lbAdd.Width, 553);
                lbAdd.Click    += delegate
                {
                    Coach car = null;
                    foreach (var it in panList.Controls)
                    {
                        if (it is CarriageList01)
                        {
                            if ((it as CarriageList01).isSelect)
                            {
                                car = (it as CarriageList01).car;
                                break;
                            }
                        }
                    }

                    if (car != null)
                    {
                        oldpage.args.Add(car);
                        oldpage.ListDraw();
                    }
                    PageManager.SetPage(oldpage, AccessManager.AccessKey);
                };
            }
            catch (Exception ex)
            {
                RTCore.Environment.ReportError(ex, AccessManager.AccessKey);
            }
        }
Example #2
0
        public CarList01(TrainParant _tp, TrainDataAdd_Args_Page _page)
        {
            try
            {
                InitializeComponent();

                tp   = _tp;
                page = _page;

                imgUp      = Image.FromStream(ResourceManager.Get($".\\data\\res\\{OptionManager.Get().ResFolder}\\images.npk", "btn_up.png", 5, 7, 1, 6));
                imgUpSel   = Image.FromStream(ResourceManager.Get($".\\data\\res\\{OptionManager.Get().ResFolder}\\images.npk", "btn_up_sel.png", 5, 7, 1, 6));
                imgDown    = Image.FromStream(ResourceManager.Get($".\\data\\res\\{OptionManager.Get().ResFolder}\\images.npk", "btn_down.png", 5, 7, 1, 6));
                imgDownSel = Image.FromStream(ResourceManager.Get($".\\data\\res\\{OptionManager.Get().ResFolder}\\images.npk", "btn_down_sel.png", 5, 7, 1, 6));

                picUp.Image   = imgUp;
                picDown.Image = imgDown;
            }
            catch (Exception ex)
            {
                RTCore.Environment.ReportError(ex, AccessManager.AccessKey);
            }
        }