Example #1
0
        public GClass6.GClass9 method_10(SlidePanel slidePanel_2, string string_0, Bot bot_0)
        {
            Point point2;

            Hotspotform hotspotform = new Hotspotform();

            hotspotform.TopLevel = false;
            hotspotform.bot_0    = bot_0;
            SlidePanel slidePanel = new SlidePanel();

            hotspotform.string_0     = string_0;
            hotspotform.slidePanel_0 = slidePanel;
            Point point1 = new Point(5, 4);

            slidePanel.Location = point1;
            Size size = new Size(484, 392);

            slidePanel.Size      = size;
            slidePanel.SlideSide = eSlideSide.Right;
            slidePanel.Controls.Add(hotspotform);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = false;
            hotspotform.Show();
            slidePanel.Visible = false;
            slidePanel_2.Controls.Add(slidePanel);
            slidePanel.IsOpen = false;
            slidePanel.BringToFront();
            slidePanel.AnimationTime = 500;
            GClass6.GClass9 gclass9 = new GClass6.GClass9();
            gclass9.method_1(hotspotform);
            gclass9.method_3(slidePanel);
            return(gclass9);
        }
Example #2
0
        public GClass6.GClass7 method_9(SlidePanel slidePanel_2, string string_0, Bot bot_0)
        {
            Point point2;

            BotSettings botSettings = new BotSettings();

            botSettings.TopLevel = false;
            botSettings.bot_0    = bot_0;
            SlidePanel slidePanel = new SlidePanel();

            botSettings.string_0     = string_0;
            botSettings.slidePanel_0 = slidePanel;
            Point point1 = new Point(5, 4);

            slidePanel.Location = point1;
            Size size = new Size(484, 392);

            slidePanel.Size      = size;
            slidePanel.SlideSide = eSlideSide.Right;
            slidePanel.Controls.Add(botSettings);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = false;
            botSettings.Show();
            slidePanel.Visible = false;
            slidePanel_2.Controls.Add(slidePanel);
            slidePanel.IsOpen = false;
            slidePanel.BringToFront();
            slidePanel.AnimationTime = 500;
            GClass6.GClass7 gclass7 = new GClass6.GClass7();
            gclass7.method_1(botSettings);
            gclass7.method_3(slidePanel);
            return(gclass7);
        }
Example #3
0
        public void method_5(string string_0)
        {
            GClass6.Class9 class9 = new GClass6.Class9();
            class9.string_0 = string_0;
            Class1.Class2_0.method_1().Refresh();
            ExpandablePanel expandablePanel = method_11(class9.string_0);

            LabelX[]         labelXArr  = method_12(expandablePanel);
            GClass6.GClass13 gclass13_2 = new GClass6.GClass13();
            gclass13_2.method_1(class9.string_0);
            gclass13_2.method_3(expandablePanel);
            gclass13_2.method_25(labelXArr[0]);
            gclass13_2.method_21(labelXArr[1]);
            gclass13_2.method_31(labelXArr[2]);
            gclass13_2.method_23(labelXArr[3]);
            gclass13_2.method_27(labelXArr[4]);
            gclass13_2.method_29(labelXArr[5]);
            gclass13_2.method_33(labelXArr[6]);
            GClass6.list_2.Add(gclass13_2);
            SlidePanel slidePanel1 = method_7(class9.string_0);
            Bot        bot         = method_8(slidePanel1, class9.string_0);

            GClass6.GClass7 gclass7     = method_9(slidePanel1, class9.string_0, bot);
            SlidePanel      slidePanel2 = gclass7.method_2();

            GClass6.GClass9  gclass9    = method_10(slidePanel1, class9.string_0, bot);
            GClass6.GClass13 gclass13_1 = Enumerable.FirstOrDefault <GClass6.GClass13>(GClass6.list_2, new Func <GClass6.GClass13, bool>(class9, class9.method_0));
            gclass13_1.method_11(slidePanel2);
            gclass13_1.method_17(gclass9.method_2());
            gclass13_1.method_19(gclass9.method_0());
            gclass13_1.method_5(slidePanel1);
            gclass13_1.method_9(gclass7.method_0());
        }
Example #4
0
        public SlidePanel method_7(string string_0)
        {
            Point      point2;
            SlidePanel slidePanel2;

            Class1.Class2_0.method_1().Refresh();
            SlidePanel slidePanel1 = new SlidePanel();
            Point      point1      = new Point(222, 15);

            slidePanel1.Location = point1;
            slidePanel1.Name     = string_0;
            Size size = new Size(500, 392);

            slidePanel1.Size                  = size;
            slidePanel1.SlideSide             = eSlideSide.Right;
            slidePanel1.SlideOutButtonVisible = false;
            slidePanel1.UsesBlockingAnimation = false;
            slidePanel1.Visible               = false;
            GClass6.slidePanel_1.Controls.Add(slidePanel1);
            slidePanel1.AnimationTime    = 500;
            BotForm.slidePanel_2         = slidePanel1;
            BotForm.slidePanel_0.Visible = false;
            BotForm.slidePanel_0.IsOpen  = false;
            slidePanel1.IsOpen           = false;
            slidePanel1.BringToFront();
            Class1.Class2_0.method_1().Refresh();
            slidePanel1.IsOpen = true;
            return(slidePanel1);
        }
Example #5
0
        private void switchPanel(PanelPosition panelPosition)
        {
            SlidePanel.Slide slideType;

            if (panelPosition == actualPosition)
            {
                return;
            }

            MetroPanel panel = new ListViewPanel((int)panelPosition);

            if (panelPosition > actualPosition)
            {
                slideType = SlidePanel.Slide.Up;
            }
            else
            {
                slideType = SlidePanel.Slide.Down;
            }

            this.Controls.Add(panel);
            SlidePanel.setPanel(slideType, panel, this.panel_clinicInside);
            this.Controls.Remove(panel_clinicInside);
            panel_clinicInside.Dispose();
            panel_clinicInside = panel;
            actualPosition     = panelPosition;
        }
Example #6
0
        public void method_4(SlidePanel slidePanel_2)
        {
            Point point2;

            PartyForm partyForm = new PartyForm();

            partyForm.TopLevel = false;
            SlidePanel slidePanel = new SlidePanel();
            Point      point1     = new Point(222, 15);

            slidePanel.Location = point1;
            slidePanel.Name     = "panelPartyForm";
            Size size = new Size(484, 392);

            slidePanel.Size      = size;
            slidePanel.SlideSide = eSlideSide.Right;
            slidePanel.Controls.Add(partyForm);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = false;
            partyForm.Show();
            slidePanel_2.Controls.Add(slidePanel);
            slidePanel.AnimationTime = 500;
            BotForm.slidePanel_1     = slidePanel;
            slidePanel.BringToFront();
            slidePanel.IsOpen = false;
        }
Example #7
0
        static SlidePanelDialog LoadSlidePanelDialog(Stream fs)
        {
            var obj = new SlidePanelDialog(ReadString(fs), ReadFont(fs), ReadInt(fs), ReadInt(fs), ReadInt(fs), ReadInt(fs), ReadBool(fs))
            {
                Enabled      = ReadBool(fs),
                Visible      = ReadBool(fs),
                AnimateSlide = ReadBool(fs),
                ForeColor    = ReadColor(fs)
            };

            var len = ReadInt(fs);

            for (var i = 0; i < len; i++)
            {
                if (fs.ReadByte() != 33)
                {
                    throw new Exception("Invalid item type; expected 33");
                }

                var t = new SlidePanel("panel" + i, ReadString(fs), ReadColor(fs));
                LoadChildren(fs, t);

                obj.AddChild(t);
            }

            return(obj);
        }
Example #8
0
        public GClass6.GClass11 method_3(SlidePanel slidePanel_2)
        {
            Point point2;

            SelectClient selectClient = new SelectClient();

            selectClient.TopLevel = false;
            SlidePanel slidePanel = new SlidePanel();
            Point      point1     = new Point(223, 15);

            slidePanel.Location = point1;
            slidePanel.Name     = "panelSelectClient";
            Size size = new Size(484, 392);

            slidePanel.Size      = size;
            slidePanel.SlideSide = eSlideSide.Right;
            slidePanel.Controls.Add(selectClient);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = false;
            selectClient.Show();
            slidePanel_2.Controls.Add(slidePanel);
            slidePanel.AnimationTime = 500;
            BotForm.slidePanel_0     = slidePanel;
            BotForm.slidePanel_2     = slidePanel;
            slidePanel.BringToFront();
            slidePanel.IsOpen = true;
            GClass6.GClass11 gclass11 = new GClass6.GClass11();
            gclass11.method_1(selectClient);
            gclass11.method_3(slidePanel);
            return(gclass11);
        }
Example #9
0
        public GClass6.GClass8 method_6(SlidePanel slidePanel_2, string string_0, Bot bot_0)
        {
            Point point2;

            QuestForm questForm = new QuestForm();

            questForm.TopLevel = false;
            questForm.bot_0    = bot_0;
            SlidePanel slidePanel = new SlidePanel();

            questForm.string_0     = string_0;
            questForm.slidePanel_0 = slidePanel;
            Point point1 = new Point(5, 4);

            slidePanel.Location = point1;
            Size size = new Size(484, 392);

            slidePanel.Size      = size;
            slidePanel.SlideSide = eSlideSide.Right;
            slidePanel.Controls.Add(questForm);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = false;
            questForm.Show();
            slidePanel.Visible = false;
            slidePanel_2.Controls.Add(slidePanel);
            slidePanel.IsOpen = false;
            slidePanel.BringToFront();
            slidePanel.AnimationTime  = 500;
            slidePanel.IsOpenChanged += new EventHandler(questForm.method_1);
            GClass6.GClass8 gclass8 = new GClass6.GClass8();
            gclass8.method_1(questForm);
            gclass8.method_3(slidePanel);
            return(gclass8);
        }
Example #10
0
        public void method_1()
        {
            Point point2;

            Login login = new Login();

            login.TopLevel = false;
            SlidePanel slidePanel = new SlidePanel();

            slidePanel.Visible = true;
            Point point1 = new Point(0, 25);

            slidePanel.Location = point1;
            slidePanel.Name     = "panelLogin";
            Size size = new Size(707, 417);

            slidePanel.Size          = size;
            slidePanel.TabIndex      = 8;
            slidePanel.AnimationTime = 1000;
            slidePanel.Controls.Add(login);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = true;
            slidePanel.IsOpen = true;
            login.Show();
            Class1.Class2_0.method_7().Controls.Add(slidePanel);
            Class1.Class2_0.method_7().Refresh();
            GClass6.slidePanel_0 = slidePanel;
            GClass6.GClass12 gclass12 = new GClass6.GClass12();
            gclass12.method_1("buttonLogin");
            gclass12.method_3(slidePanel);
            gclass12.method_9(login);
            GClass6.list_1.Add(gclass12);
        }
Example #11
0
 public void switchLateralPanel(MetroPanel panel, SlidePanel.Slide slideType)
 {
     this.Controls.Add(panel);
     SlidePanel.setPanel(slideType, panel, this.panel_clinicInside);
     this.Controls.Remove(panel_clinicInside);
     panel_clinicInside.Dispose();
     panel_clinicInside = panel;
 }
        private void btn_goClinic_Click(object sender, EventArgs e)
        {
            MetroPanel newPanel = new Panel.ClinicPanel();

            Controls.Add(newPanel);
            SlidePanel.setPanel(Slide.Right, newPanel, actualPanel);
            Controls.Remove(actualPanel);
            actualPanel.Dispose();
            actualPanel = newPanel;
        }
Example #13
0
        private void Btn_clinicBack_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            Clinic_SPA temp         = new Clinic_SPA();
            MetroPanel initialPanel = temp.panel_initialPanel;
            //temp.Dispose();
            Clinic_SPA clinic_SPAForm = Clinic_SPA.get();

            clinic_SPAForm.Controls.Add(initialPanel);
            SlidePanel.setPanel(Slide.Left, initialPanel, this);
            clinic_SPAForm.Controls.Remove(this);
            clinic_SPAForm.actualPanel = initialPanel;
            this.Dispose();
        }
        private void bgWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (result)
            {
                MessageBox.Show("Success");

                textBox1.ForeColor = SystemColors.GrayText;
                textBox1.Text      = "Username";

                textBox2.ForeColor = SystemColors.GrayText;
                textBox2.Text      = "Old password";

                textBox3.ForeColor = SystemColors.GrayText;
                textBox3.Text      = "New password";

                SlidePanel.Show();
                SlidePanel2.Hide();
                SlidePanel3.Hide();
                panel4.BackColor = Color.Gainsboro;
                panel6.BackColor = Color.WhiteSmoke;
                panel2.BackColor = Color.WhiteSmoke;

                lblStatus.ForeColor = Color.Green;
                lblStatus.Visible   = true;
                lblStatus.Text      = "Done";
            }
            else
            {
                MessageBox.Show("Could not update your password");

                textBox1.ForeColor = SystemColors.GrayText;
                textBox1.Text      = "Username";

                textBox2.ForeColor = SystemColors.GrayText;
                textBox2.Text      = "Old password";

                textBox3.ForeColor = SystemColors.GrayText;
                textBox3.Text      = "New password";

                SlidePanel.Show();
                SlidePanel2.Hide();
                SlidePanel3.Hide();
                panel4.BackColor = Color.Gainsboro;
                panel6.BackColor = Color.WhiteSmoke;
                panel2.BackColor = Color.WhiteSmoke;

                lblStatus.ForeColor = Color.Red;
                lblStatus.Visible   = true;
                lblStatus.Text      = "Error";
            }
        }
Example #15
0
        public Bot method_8(SlidePanel slidePanel_2, string string_0)
        {
            List <GClass6.GClass13> .Enumerator enumerator;
            Point point2;

            GClass6.Class10 class10 = new GClass6.Class10();
            class10.string_0 = string_0;
            Bot bot = new Bot();

            bot.string_0 = class10.string_0;
            bot.vmethod_26().Text = Strings.UCase(class10.string_0);
            bot.TopLevel = false;
            SlidePanel slidePanel = new SlidePanel();
            Point      point1     = new Point(0, 4);

            slidePanel.Location = point1;
            slidePanel.Name     = "panelSelectClient";
            Size size = new Size(484, 392);

            slidePanel.Size          = size;
            slidePanel.AnimationTime = 500;
            slidePanel.SlideSide     = eSlideSide.Right;
            slidePanel.Controls.Add(bot);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = false;
            bot.Show();
            slidePanel.BringToFront();
            slidePanel.Visible = false;
            slidePanel_2.Controls.Add(slidePanel);
            slidePanel.IsOpen = false;
            slidePanel.BringToFront();
            slidePanel.IsOpen = true;
            List <GClass6.GClass13> list = GClass6.list_2.FindAll(new Predicate <GClass6.GClass13>(class10, class10.method_0));

            try
            {
                enumerator = list.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    GClass6.GClass13 gclass13 = enumerator.get_Current();
                    gclass13.method_7(bot);
                }
            }
            finally
            {
                enumerator.Dispose();
            }
            return(bot);
        }
Example #16
0
        private void textBox2_Enter(object sender, EventArgs e)
        {
            SlidePanel.Hide();
            panel2.BackColor = Color.WhiteSmoke;

            panel5.BackColor = Color.Gainsboro;
            SlidePanel2.Show();

            textBox2.Clear();
            textBox2.ForeColor = SystemColors.WindowText;
            if (String.IsNullOrEmpty(textBox1.Text))
            {
                textBox1.ForeColor = SystemColors.GrayText;
                textBox1.Text      = "Username";
            }
        }
Example #17
0
        private void BgWorker_Finished(object s, RunWorkerCompletedEventArgs e)
        {
            //MessageBox.Show("mail Send");
            if (mailStatus)
            {
                MessageBox.Show("E-mail with your password has been sent");
                textBox1.ForeColor = SystemColors.GrayText;
                textBox1.Text      = "E-mail";

                textBox2.ForeColor = SystemColors.GrayText;
                textBox2.Text      = "Username";

                SlidePanel.Show();
                SlidePanel2.Hide();

                panel4.BackColor = Color.Gainsboro;
                panel6.BackColor = Color.WhiteSmoke;


                lblStatus.ForeColor = Color.Green;
                lblStatus.Visible   = true;
                lblStatus.Text      = "Mail sent";
            }
            else
            {
                MessageBox.Show("Something went wrong while recovering the password");
                textBox1.ForeColor = SystemColors.GrayText;
                textBox1.Text      = "E-mail";

                textBox2.ForeColor = SystemColors.GrayText;
                textBox2.Text      = "Username";

                SlidePanel.Show();
                SlidePanel2.Hide();

                panel4.BackColor = Color.Gainsboro;
                panel6.BackColor = Color.WhiteSmoke;

                lblStatus.ForeColor = Color.Red;
                lblStatus.Visible   = true;
                lblStatus.Text      = "Error";
            }
        }
Example #18
0
        public void method_2()
        {
            Point point2;

            GClass6.GClass12 gclass12 = new GClass6.GClass12();
            BotForm          botForm  = new BotForm();

            botForm.TopLevel = false;
            SlidePanel slidePanel = new SlidePanel();

            slidePanel.Visible = false;
            Point point1 = new Point(0, 25);

            slidePanel.Location = point1;
            slidePanel.Name     = "panelGrinder";
            Size size = new Size(707, 417);

            slidePanel.Size          = size;
            slidePanel.TabIndex      = 8;
            slidePanel.AnimationTime = 1000;
            slidePanel.Controls.Add(botForm);
            slidePanel.SlideOutButtonVisible = false;
            slidePanel.UsesBlockingAnimation = false;
            botForm.Show();
            GClass6.slidePanel_1 = slidePanel;
            method_4(slidePanel);
            GClass6.GClass11 gclass11 = method_3(slidePanel);
            gclass12.method_5(gclass11.method_0());
            gclass12.method_7(gclass11.method_2());
            Class1.Class2_0.method_7().Controls.Add(slidePanel);
            slidePanel.IsOpen = false;
            Class1.Class2_0.method_7().Refresh();
            GClass6.slidePanel_0 = slidePanel;
            gclass12.method_1("buttonGrinder");
            gclass12.method_9(botForm);
            gclass12.method_3(slidePanel);
            GClass6.list_1.Add(gclass12);
        }
Example #19
0
 public void method_1(object sender, EventArgs e)
 {
     SlidePanel slidePanel = (SlidePanel)sender;
     if (slidePanel.IsOpen)
     {
         if (QuestForm.GClass37.smethod_2() == IntPtr.Zero)
         {
             QuestForm.Class20 class20 = new QuestForm.Class20();
             class20.questForm_0 = this;
             vmethod_10().Text = "Searching Region";
             byte[] bArr = new byte[] { 0, 48, 15, 1, 0, 48, 15, 1 };
             class20.byte_0 = bArr;
             class20.string_0 = "xxxxxxxx";
             Thread thread = new Thread(new ThreadStart(class20.method_0));
             thread.IsBackground = true;
             thread.Start();
         }
         else
         {
             vmethod_10().Text = "Region Found";
             vmethod_8().RecalcLayout();
         }
     }
 }
        private void textBox1_Enter(object sender, EventArgs e)
        {
            SlidePanel2.Hide();
            SlidePanel3.Hide();
            panel6.BackColor = Color.WhiteSmoke;
            panel2.BackColor = Color.WhiteSmoke;
            textBox1.Clear();

            panel4.BackColor = Color.Gainsboro;
            SlidePanel.Show();

            textBox1.Clear();
            textBox1.ForeColor = SystemColors.WindowText;
            if (String.IsNullOrEmpty(textBox2.Text))
            {
                textBox2.ForeColor = SystemColors.GrayText;
                textBox2.Text      = "Old password";
            }
            if (String.IsNullOrEmpty(textBox3.Text))
            {
                textBox3.ForeColor = SystemColors.GrayText;
                textBox3.Text      = "New password";
            }
        }
Example #21
0
 public void method_17(SlidePanel slidePanel_4)
 {
     slidePanel_3 = slidePanel_4;
 }
 public RmlEditorViewInfo(RmlWysiwygView view, SlidePanel slidePanel, EditorResourceProvider resourceProvider)
 {
     this.View      = view;
     this.Panel     = slidePanel;
     cachedResource = new ResourceProviderTextCachedResource(view.RmlFile, Encoding.UTF8, "", resourceProvider);
 }
Example #23
0
 private void Start()
 {
     slidePanel = FindObjectOfType <SlidePanel>();
 }
Example #24
0
 public void method_3(SlidePanel slidePanel_2)
 {
     slidePanel_0 = slidePanel_2;
 }
Example #25
0
        private void InsertOrders(OrderType type)
        {
            orderGrid.Children.Clear();
            orderGrid.RowDefinitions.Clear();
            orderGrid.ColumnDefinitions.Clear();
            List <OrderInfo> orders = null;

            switch (type)
            {
            case OrderType.NOT_PAY:
                orders = notPayOrders;
                break;

            case OrderType.PAYED:
                orders = payedOrders;
                break;

            case OrderType.COMPLETED:
                orders = completedOrders;
                break;

            default:
                break;
            }
            if (null == orders)
            {
                return;
            }
            int count = orders.Count;

            for (int i = 0; i < count; i++)
            {
                RowDefinition row = new RowDefinition();
                //row.Height = new GridLength(orderGridSizeInfo.orderGridHeight);
                orderGrid.RowDefinitions.Add(row);
            }
            int nRow = 0;

            foreach (var item in orders)
            {
                Grid oneOrderGrid = new Grid();
                oneOrderGrid.Background = new SolidColorBrush(Color.FromArgb(255, 235, 235, 235));

                //Init four panels
                RelativePanel topPanel = new RelativePanel();
                topPanel.Background = new SolidColorBrush(Color.FromArgb(255, 241, 241, 241));
                topPanel.Height     = orderGridSizeInfo.infoPanelHeight + orderGridSizeInfo.margin;
                topPanel.Width      = infoPanel.Width;
                Grid.SetColumn(topPanel, 0);
                Grid.SetRow(topPanel, 0);
                oneOrderGrid.Children.Add(topPanel);

                RelativePanel addressPanel = new RelativePanel();
                addressPanel.Height     = orderGridSizeInfo.infoPanelHeight + orderGridSizeInfo.margin;
                addressPanel.Width      = infoPanel.Width;
                addressPanel.Background = new SolidColorBrush(Color.FromArgb(255, 241, 241, 241));
                Grid.SetColumn(addressPanel, 0);
                Grid.SetRow(addressPanel, 2);
                oneOrderGrid.Children.Add(addressPanel);

                //goods panel
                RelativePanel goodsGridPanel = new RelativePanel();
                goodsGridPanel.Background = new SolidColorBrush(Color.FromArgb(255, 235, 235, 235));
                //goodsGridPanel.Width = infoPanel.Width;
                goodsGridPanel.Height = orderGridSizeInfo.goodsPicHeight + 4 * orderGridSizeInfo.margin + orderGridSizeInfo.infoPanelHeight * 2;

                //SlidePanel slidePanel = new SlidePanel(infoPanel.Width);
                //slidePanel.Add(goodsGridPanel,orderGridSizeInfo.goodsPicWidth);
                //Grid.SetColumn(slidePanel, 0);
                //Grid.SetRow(slidePanel, 1);
                //oneOrderGrid.Children.Add(slidePanel);

                //Grid.SetColumn(goodsGridPanel, 0);
                //Grid.SetRow(goodsGridPanel, 1);
                //oneOrderGrid.Children.Add(goodsGridPanel);

                RelativePanel buttonPanel = new RelativePanel();
                buttonPanel.Background = new SolidColorBrush(Color.FromArgb(255, 241, 241, 241));
                buttonPanel.Width      = infoPanel.Width;
                buttonPanel.Height     = orderGridSizeInfo.infoPanelHeight + orderGridSizeInfo.margin * 2;
                Grid.SetColumn(buttonPanel, 0);
                Grid.SetRow(buttonPanel, 3);
                buttonPanel.VerticalAlignment = VerticalAlignment.Top;
                oneOrderGrid.Children.Add(buttonPanel);

                RowDefinition topRow = new RowDefinition();
                topRow.Height = new GridLength(topPanel.Height);
                oneOrderGrid.RowDefinitions.Add(topRow);
                RowDefinition goodsGridRow = new RowDefinition();
                goodsGridRow.Height = new GridLength(goodsGridPanel.Height);
                oneOrderGrid.RowDefinitions.Add(goodsGridRow);
                RowDefinition addressRow = new RowDefinition();
                addressRow.Height = new GridLength(addressPanel.Height);
                oneOrderGrid.RowDefinitions.Add(addressRow);
                RowDefinition buttonRow = new RowDefinition();
                buttonRow.Height = new GridLength(buttonPanel.Height + orderGridSizeInfo.margin);
                oneOrderGrid.RowDefinitions.Add(buttonRow);

                #region order info panel items
                TextBlock topLeft = new TextBlock();
                topLeft.Width      = 80;
                topLeft.Height     = orderGridSizeInfo.infoPanelHeight;
                topLeft.Text       = "订单号";
                topLeft.Foreground = new SolidColorBrush(Color.FromArgb(255, 51, 51, 51));
                topLeft.Margin     = new Thickness(20, 0, 0, 0);
                topLeft.SetValue(RelativePanel.AlignLeftWithPanelProperty, true);
                topLeft.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                topPanel.Children.Add(topLeft);

                TextBlock topRight = new TextBlock();
                topRight.Width      = 150;
                topRight.Height     = orderGridSizeInfo.infoPanelHeight;
                topRight.Text       = item.id;
                topRight.Foreground = new SolidColorBrush(Color.FromArgb(255, 51, 51, 51));
                topRight.Margin     = new Thickness(0, 0, 20, 0);
                topRight.SetValue(RelativePanel.AlignRightWithPanelProperty, true);
                topRight.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                topRight.TextAlignment = TextAlignment.Right;
                topPanel.Children.Add(topRight);
                #endregion

                #region address panel item
                TextBlock addressLeft = new TextBlock();
                addressLeft.Width      = topPanel.Width / 2;
                addressLeft.Height     = orderGridSizeInfo.infoPanelHeight;
                addressLeft.Margin     = new Thickness(20, 0, 0, 0);
                addressLeft.Text       = "配送地址";
                addressLeft.Foreground = new SolidColorBrush(Color.FromArgb(255, 51, 51, 51));
                addressLeft.SetValue(RelativePanel.AlignLeftWithPanelProperty, true);
                addressLeft.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                addressPanel.Children.Add(addressLeft);

                TextBlock addressRight = new TextBlock();
                addressRight.Width         = 150;
                addressRight.Height        = orderGridSizeInfo.infoPanelHeight;
                addressRight.Text          = item.address;
                addressRight.Foreground    = new SolidColorBrush(Color.FromArgb(255, 51, 51, 51));
                addressRight.Margin        = new Thickness(0, 0, 20, 0);
                addressRight.TextAlignment = TextAlignment.Right;
                addressRight.SetValue(RelativePanel.AlignRightWithPanelProperty, true);
                addressRight.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                addressPanel.Children.Add(addressRight);
                #endregion

                #region button panel item
                TextBlock priceText = new TextBlock();
                priceText.Width         = 12;
                priceText.Height        = 20;
                priceText.Text          = "¥";
                priceText.Name          = "priceText";
                priceText.Foreground    = new SolidColorBrush(Color.FromArgb(255, 253, 40, 3));
                priceText.TextAlignment = TextAlignment.Left;
                priceText.SetValue(RelativePanel.AlignLeftWithPanelProperty, true);
                priceText.SetValue(RelativePanel.AlignHorizontalCenterWithPanelProperty, true);
                priceText.Margin = new Thickness(17, 0, 0, -32);
                buttonPanel.Children.Add(priceText);

                TextBlock priceNumberText = new TextBlock();
                priceNumberText.Width         = 70;
                priceNumberText.Height        = orderGridSizeInfo.infoPanelHeight;
                priceNumberText.Text          = item.price;
                priceNumberText.Foreground    = new SolidColorBrush(Colors.Red);
                priceNumberText.FontSize      = 20;
                priceNumberText.TextAlignment = TextAlignment.Left;
                priceNumberText.SetValue(RelativePanel.RightOfProperty, "priceText");
                priceNumberText.SetValue(RelativePanel.AlignHorizontalCenterWithPanelProperty, true);
                priceNumberText.Margin = new Thickness(3, 0, 0, 0);
                buttonPanel.Children.Add(priceNumberText);

                Button btnPay = new Button();
                if (item.payed.Equals("true"))
                {
                    btnPay.Visibility = Visibility.Collapsed;
                }
                btnPay.Width  = 100;
                btnPay.Height = orderGridSizeInfo.infoPanelHeight;
                btnPay.VerticalContentAlignment   = VerticalAlignment.Center;
                btnPay.HorizontalContentAlignment = HorizontalAlignment.Center;
                btnPay.BorderThickness            = new Thickness(0);
                btnPay.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 255, 78, 0));
                btnPay.Name        = "btnPay";
                TextBlock btnPayText = new TextBlock();
                btnPayText.Text       = "进行付款";
                btnPayText.Foreground = new SolidColorBrush(Colors.White);
                btnPay.Content        = btnPayText;
                //btnPay.Foreground = new SolidColorBrush(Colors.White);
                btnPay.Background = new SolidColorBrush(Color.FromArgb(255, 255, 78, 0));
                btnPay.SetValue(RelativePanel.AlignRightWithPanelProperty, true);
                btnPay.SetValue(RelativePanel.AlignHorizontalCenterWithPanelProperty, true);
                btnPay.Margin = new Thickness(0, 0, 20, 0);
                buttonPanel.Children.Add(btnPay);

                Button btnCancel = new Button();
                btnCancel.Width  = 100;
                btnCancel.Height = orderGridSizeInfo.infoPanelHeight;
                btnCancel.VerticalContentAlignment   = VerticalAlignment.Center;
                btnCancel.HorizontalContentAlignment = HorizontalAlignment.Center;
                //btnCancel.Content = "取消订单";
                TextBlock btnCancelText = new TextBlock();
                btnCancelText.Text        = "取消订单";
                btnCancelText.Foreground  = new SolidColorBrush(Colors.White);
                btnCancel.Content         = btnCancelText;
                btnCancel.BorderThickness = new Thickness(0);
                btnCancel.BorderBrush     = new SolidColorBrush(Color.FromArgb(255, 148, 148, 148));
                //btnCancel.Foreground = new SolidColorBrush(Colors.White);
                btnCancel.Background = new SolidColorBrush(Color.FromArgb(255, 148, 148, 148));
                btnCancel.Margin     = new Thickness(0, 0, 5, 0);
                btnCancel.SetValue(RelativePanel.LeftOfProperty, "btnPay");
                btnCancel.SetValue(RelativePanel.AlignHorizontalCenterWithPanelProperty, true);
                buttonPanel.Children.Add(btnCancel);
                #endregion

                #region goods detail panel item
                int    goodsCount          = item.goodsList.Count;
                double goodsGridPanelWidth = 0;
                for (int i = 0; i < goodsCount; i++)
                {
                    RelativePanel goodsItemPanel = new RelativePanel();
                    goodsItemPanel.Background = new SolidColorBrush(Color.FromArgb(255, 224, 224, 224));
                    goodsItemPanel.SetValue(RelativePanel.AlignLeftWithPanelProperty, true);
                    goodsItemPanel.Margin = new Thickness(goodsGridPanelWidth + orderGridSizeInfo.margin, 0, 0, 0);
                    //goods name
                    TextBlock goodsNameText = new TextBlock();
                    goodsNameText.Width         = 60;
                    goodsNameText.Height        = orderGridSizeInfo.infoPanelHeight - 5;
                    goodsNameText.Text          = item.goodsList[i].name;
                    goodsNameText.TextAlignment = TextAlignment.Left;
                    goodsNameText.Foreground    = new SolidColorBrush(Color.FromArgb(255, 51, 51, 51));
                    goodsNameText.SetValue(RelativePanel.AlignLeftWithPanelProperty, true);
                    goodsNameText.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                    goodsNameText.Margin = new Thickness(orderGridSizeInfo.margin, 0, 0, orderGridSizeInfo.margin);
                    goodsItemPanel.Children.Add(goodsNameText);

                    //goods number
                    TextBlock numberText = new TextBlock();
                    numberText.Height        = orderGridSizeInfo.infoPanelHeight - 5;
                    numberText.Width         = 25;
                    numberText.Name          = "number";
                    numberText.TextAlignment = TextAlignment.Right;
                    numberText.Foreground    = new SolidColorBrush(Color.FromArgb(255, 51, 51, 51));
                    numberText.Text          = "x" + Convert.ToString(item.goodsList[i].count);
                    numberText.SetValue(RelativePanel.AlignRightWithPanelProperty, true);
                    numberText.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                    numberText.Margin = new Thickness(0, 0, orderGridSizeInfo.margin, orderGridSizeInfo.margin);
                    goodsItemPanel.Children.Add(numberText);

                    //goods price
                    TextBlock singlePriceText = new TextBlock();
                    singlePriceText.Height        = orderGridSizeInfo.infoPanelHeight;
                    singlePriceText.Width         = 30;
                    singlePriceText.Name          = "singlePriceText";
                    singlePriceText.TextAlignment = TextAlignment.Left;
                    singlePriceText.FontSize      = 20;
                    singlePriceText.Foreground    = new SolidColorBrush(Color.FromArgb(255, 253, 40, 3));
                    singlePriceText.Text          = item.goodsList[i].price;
                    singlePriceText.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                    singlePriceText.SetValue(RelativePanel.LeftOfProperty, "number");
                    singlePriceText.Margin = new Thickness(0, 0, 0, orderGridSizeInfo.margin);
                    goodsItemPanel.Children.Add(singlePriceText);

                    TextBlock priceSymbol = new TextBlock();
                    priceSymbol.Height        = orderGridSizeInfo.infoPanelHeight - 5;
                    priceSymbol.Width         = 20;
                    priceSymbol.TextAlignment = TextAlignment.Right;
                    priceSymbol.FontSize      = 16;
                    priceSymbol.Foreground    = new SolidColorBrush(Color.FromArgb(255, 253, 40, 3));
                    priceSymbol.Text          = "¥";
                    priceSymbol.SetValue(RelativePanel.AlignBottomWithPanelProperty, true);
                    priceSymbol.SetValue(RelativePanel.LeftOfProperty, "singlePriceText");
                    priceSymbol.Margin = new Thickness(0, 0, 0, orderGridSizeInfo.margin);
                    goodsItemPanel.Children.Add(priceSymbol);

                    //pictrue name
                    TextBlock picNameText = new TextBlock();
                    picNameText.Name          = "picNameText";
                    picNameText.Height        = orderGridSizeInfo.infoPanelHeight;
                    picNameText.Width         = orderGridSizeInfo.goodsPicWidth;
                    picNameText.Text          = item.goodsList[i].imageName;
                    picNameText.TextAlignment = TextAlignment.Left;
                    picNameText.Foreground    = new SolidColorBrush(Color.FromArgb(255, 51, 51, 51));
                    picNameText.FontSize      = 18;
                    picNameText.SetValue(RelativePanel.AlignLeftWithPanelProperty, true);
                    picNameText.SetValue(RelativePanel.AboveProperty, "singlePriceText");
                    picNameText.Margin = new Thickness(orderGridSizeInfo.margin, 0, 0, orderGridSizeInfo.margin);
                    goodsItemPanel.Children.Add(picNameText);

                    //goods picture
                    Grid          picGrid = new Grid();
                    RowDefinition row     = new RowDefinition();
                    row.Height = new GridLength(orderGridSizeInfo.goodsPicHeight);
                    ColumnDefinition col = new ColumnDefinition();
                    col.Width = new GridLength(orderGridSizeInfo.goodsPicWidth);
                    picGrid.RowDefinitions.Add(row);
                    picGrid.ColumnDefinitions.Add(col);
                    Border border = new Border();
                    border.BorderBrush     = new SolidColorBrush(Colors.White);
                    border.BorderThickness = new Thickness(1);
                    border.CornerRadius    = new CornerRadius(3, 3, 3, 3);
                    border.Background      = item.goodsList[i].brush;
                    picGrid.Children.Add(border);
                    picGrid.SetValue(RelativePanel.AlignLeftWithPanelProperty, true);
                    picGrid.SetValue(RelativePanel.AlignRightWithPanelProperty, true);
                    picGrid.SetValue(RelativePanel.AlignTopWithPanelProperty, true);
                    picGrid.SetValue(RelativePanel.AboveProperty, "picNameText");
                    picGrid.Margin = new Thickness(orderGridSizeInfo.margin, orderGridSizeInfo.margin, orderGridSizeInfo.margin, orderGridSizeInfo.margin);
                    goodsItemPanel.Children.Add(picGrid);

                    goodsGridPanelWidth += (orderGridSizeInfo.goodsPicWidth + 3 * orderGridSizeInfo.margin);
                    goodsGridPanel.Children.Add(goodsItemPanel);
                }
                SlidePanel slidePanel = new SlidePanel(infoPanel.Width);
                goodsGridPanel.Width = goodsGridPanelWidth;
                slidePanel.Add(goodsGridPanel, orderGridSizeInfo.goodsPicWidth + orderGridSizeInfo.margin);
                Grid.SetColumn(slidePanel, 0);
                Grid.SetRow(slidePanel, 1);
                oneOrderGrid.Children.Add(slidePanel);
                #endregion



                Grid.SetColumn(oneOrderGrid, 0);
                Grid.SetRow(oneOrderGrid, nRow);
                orderGrid.Children.Add(oneOrderGrid);
                nRow++;
            }
        }
Example #26
0
 public void method_7(SlidePanel slidePanel_2)
 {
     slidePanel_1 = slidePanel_2;
 }
Example #27
0
 public void method_11(SlidePanel slidePanel_4)
 {
     slidePanel_1 = slidePanel_4;
 }
Example #28
0
 public void method_15(SlidePanel slidePanel_4)
 {
     slidePanel_2 = slidePanel_4;
 }
Example #29
0
 public void method_5(SlidePanel slidePanel_4)
 {
     slidePanel_0 = slidePanel_4;
 }
Example #30
0
 public void method_3(SlidePanel slidePanel_1)
 {
     slidePanel_0 = slidePanel_1;
 }