示例#1
0
        public usrc_Invoice()
        {
            InitializeComponent();
            usrc_AddOn1.Init(this);
            m_mode = emode.view_eInvoiceType;
            lngRPM.s_Show_Shops.Text(btn_Show_Shops);
            lngRPM.s_Issuer.Text(lbl_MyOrganisation);
            lngRPM.s_Number.Text(lbl_Number);
            lngRPM.s_Currency.Text(lbl_Currency);
            //btn_BuyerSelect.Text = lngRPM.s_BuyerSelect.s;
            lngRPM.s_Issue.Text(btn_Issue);
            lngRPM.s_chk_Storno.Text(chk_Storno);

            lngRPM.s_Shop_AB = new ltext(lngRPM.s_Shop_A.sText(0) + " && " + lngRPM.s_Shop_B.sText(0), lngRPM.s_Shop_A.sText(1) + " && " + lngRPM.s_Shop_B.sText(1));
            lngRPM.s_Shop_BC = new ltext(lngRPM.s_Shop_B.sText(0) + " && " + lngRPM.s_Shop_C.sText(0), lngRPM.s_Shop_B.sText(1) + " && " + lngRPM.s_Shop_C.sText(1));
            lngRPM.s_Shop_AC = new ltext(lngRPM.s_Shop_A.sText(0) + " && " + lngRPM.s_Shop_C.sText(0), lngRPM.s_Shop_A.sText(1) + " && " + lngRPM.s_Shop_C.sText(1));
            lngRPM.s_Shop_ABC = new ltext(lngRPM.s_Shop_A.sText(0) + " && " + lngRPM.s_Shop_B.sText(0) + " && " + lngRPM.s_Shop_C.sText(0), lngRPM.s_Shop_A.sText(1) + " && " + lngRPM.s_Shop_B.sText(1) + " && " + lngRPM.s_Shop_C.sText(1));

            lngRPM.s_MyOrganisation.Text(lbl_MyOrganisation);
            lngRPM.s_Total.Text(this.lbl_Sum);
            //SetMode(m_mode);
        }
示例#2
0
        private void Form1_MouseClick(object sender, MouseEventArgs c)
        {
            int da, db, dc, dr;
            bool
            if (c.Button == MouseButtons.Left && moving == false)
            {

                for (int i = 0; i < kol; i++)
                {
                    for (int j = 0; j < kol; j++)
                    {
                        map[i, j].start = false;
                        map[i, j].path.Clear();
                        map[i, j].val = 10000000;
                        map[i, j].onway = false;

                        da = map[i, j].x1 - wid / 2;
                        db = map[i, j].y1 - wid / 2;
                        dc = map[i, j].x1 + wid / 2;
                        dr = map[i, j].y1 + wid / 2;
                        if (c.X <= dc && c.Y >= db && c.X > da && c.Y < dr && map[i, j].confirm_road)
                        {
                            if(current != null) map[current.i, current.j].current = false;
                            map[i, j].current = true;
                            current = map[i, j];
                        }

                    }
                }
            }
            if (c.Button == MouseButtons.Right && mode == emode.m_set_train_end)
            {

                for (int i = 0; i < kol; i++)
                {
                    for (int j = 0; j < kol; j++)
                    {
                        map[i, j].start = false;
                        map[i, j].path.Clear();
                        map[i, j].val = 10000000;
                        map[i, j].onway = false;

                        da = map[i, j].x1 - wid / 2;
                        db = map[i, j].y1 - wid / 2;
                        dc = map[i, j].x1 + wid / 2;
                        dr = map[i, j].y1 + wid / 2;
                        if (c.X <= dc && c.Y >= db && c.X > da && c.Y < dr && map[i, j].confirm_road)
                        {
                            cur_train.xfin = i;
                            cur_train.yfin = j;
                            bool tw = FindTrainWay(cur_train);
                            if (tw == true)
                            {
                                cur_train.moving = true;
                                Ltrains.Add(cur_train);
                                mode = emode.m_normal;
                            }
                        }

                    }
                }

            }
        }
示例#3
0
 private void button6_Click(object sender, EventArgs e)
 {
     if(current == null) return;
     train t = new train();
     t.xst = current.i;
     t.yst = current.j;
     cur_train = t;
     mode = emode.m_set_train_end;
 }