Пример #1
0
        public Register(Canvas can, string regiune)
        {
            CanPrincipal = can;
            AtributeGlobale.UserIsRegistering = true;
            //---
            regiune_global = regiune;
            RegisterMeniu = new Canvas() { Background = new SolidColorBrush(Colors.Transparent), Margin = new Thickness(436, 10, 0, 0), Width = 357, Height = 500, Opacity = 1, Visibility = Visibility.Collapsed };
            can.Children.Add(RegisterMeniu);
            TextBlock tb1 = new TextBlock() { Text = "Welcome to "+regiune, FontFamily = new FontFamily("Tahoma"), FontSize = 22, FontWeight=FontWeights.SemiBold, Foreground = new SolidColorBrush(Colors.White) };
            tb1.Margin = new Thickness((RegisterMeniu.ActualWidth - tb1.ActualWidth) / 2, 25, 10, 10);
            RegisterMeniu.Children.Add(tb1);

            double left = (RegisterMeniu.ActualWidth - 206) / 2;
            double left2 = (RegisterMeniu.ActualWidth - 250) / 2;
            #region First name
            b1 = new ControlCuColturiRotunde(RegisterMeniu, 206, 39, left, 90, true, 0.43);
            ControlCuColturiRotunde t1 = new ControlCuColturiRotunde(RegisterMeniu, 90, 39, left, 90, true, 1) { Background = new SolidColorBrush(Colors.Transparent)};
            b1.Opacity = 0.43;
            firstname  = new TextBox();
            b1.Colors("#FF9bc7d1", "#FFd5e4e7", new Point(0.5, 1), new Point(0.5, 0), null);
            b1.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            b1.Colturi(10, 10, new Rect(0, 0, 206, 38));
            t1.AddTextBlock(new TextBlock(), "First name:", 15, 5, 10, null);
            b1.AddTextBox(firstname, "", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", null, true, 95, 5);
            #endregion
            #region Last name
            b2 = new ControlCuColturiRotunde(RegisterMeniu, 206, 39, left, 135, true, 0.43);
            ControlCuColturiRotunde t2 = new ControlCuColturiRotunde(RegisterMeniu, 90, 39, left, 135, true, 1) { Background = new SolidColorBrush(Colors.Transparent) };
            b2.Opacity = 0.43;
            lastname = new TextBox();
            b2.Colors("#FF9bc7d1", "#FFd5e4e7", new Point(0.5, 1), new Point(0.5, 0), null);
            b2.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            b2.Colturi(10, 10, new Rect(0, 0, 206, 38));
            t2.AddTextBlock(new TextBlock(), "Last name:", 15, 5, 10, null);
            b2.AddTextBox(lastname, "", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", null, true, 95, 5);
            #endregion
            #region Username
            b3 = new ControlCuColturiRotunde(RegisterMeniu, 206, 39, left, 180, true, 0.43);
            ControlCuColturiRotunde t3 = new ControlCuColturiRotunde(RegisterMeniu, 90, 39, left, 180, true, 1) { Background = new SolidColorBrush(Colors.Transparent) };
            b3.Opacity = 0.43;
            username = new TextBox();
            b3.Colors("#FF9bc7d1", "#FFd5e4e7", new Point(0.5, 1), new Point(0.5, 0), null);
            b3.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            b3.Colturi(10, 10, new Rect(0, 0, 206, 38));
            t3.AddTextBlock(new TextBlock(), "Username:"******"", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", null, true, 95, 5);
            #endregion
            #region Password
            b4 = new ControlCuColturiRotunde(RegisterMeniu, 206, 39, left, 225, true, 0.43);
            ControlCuColturiRotunde t4 = new ControlCuColturiRotunde(RegisterMeniu, 90, 39, left, 225, true, 1) { Background = new SolidColorBrush(Colors.Transparent) };
            b4.Opacity = 0.43;
            pass = new PasswordBox();
            b4.Colors("#FF9bc7d1", "#FFd5e4e7", new Point(0.5, 1), new Point(0.5, 0), null);
            b4.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            b4.Colturi(10, 10, new Rect(0, 0, 206, 38));
            t4.AddTextBlock(new TextBlock(), "Password:"******"", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", "#FFBE4141", true, 95, 5);
            #endregion
            #region PasswordRetype
            b5 = new ControlCuColturiRotunde(RegisterMeniu, 206, 39, left, 270, true, 0.43);
            ControlCuColturiRotunde t5 = new ControlCuColturiRotunde(RegisterMeniu, 90, 39, left, 270, true, 1) { Background = new SolidColorBrush(Colors.Transparent) };
            b5.Opacity = 0.43;
            passre = new PasswordBox();
            b5.Colors("#FF9bc7d1", "#FFd5e4e7", new Point(0.5, 1), new Point(0.5, 0), null);
            b5.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            b5.Colturi(10, 10, new Rect(0, 0, 206, 38));
            t5.AddTextBlock(new TextBlock(), "Retype:", 15, 5, 10, null);
            b5.AddPasswordTextBox(passre, "", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", "#FFBE4141", true, 95, 5);
            #endregion
            #region Mail
            b6 = new ControlCuColturiRotunde(RegisterMeniu, 206, 39, left, 315, true, 0.43);
            ControlCuColturiRotunde t6 = new ControlCuColturiRotunde(RegisterMeniu, 90, 39, left, 315, true, 1) { Background = new SolidColorBrush(Colors.Transparent) };
            b6.Opacity = 0.43;
            mail = new TextBox();
            b6.Colors("#FF9bc7d1", "#FFd5e4e7", new Point(0.5, 1), new Point(0.5, 0), null);
            b6.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            b6.Colturi(10, 10, new Rect(0, 0, 206, 38));
            t6.AddTextBlock(new TextBlock(), "E-mail:", 15, 5, 10, null);
            b6.AddTextBox(mail, "", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", null, true, 95, 5);
            #endregion
            #region Registerbutton

            canvasforbutton = new ControlCuColturiRotunde(RegisterMeniu, 206, 39, left, 360, false, 1);
            canvasforbutton.Colors("#FF969a07", "#FF7a7d04", new Point(0.5, 1), new Point(0.5, 0), null);
            canvasforbutton.Border(new CornerRadius(10, 10, 10, 10), "#FF9fa13a", new Thickness(1), 208, 40);
            canvasforbutton.Colturi(10, 10, new Rect(0, 0, 206, 38));
            canvasforbutton.AddTextBlock(new TextBlock(), "Register", 17, 68, 5, "#ffe0e1c0");
            Canvas butonlogin = canvasforbutton.intoarce();
            butonlogin.Cursor = Cursors.Hand;
            butonlogin.MouseEnter += new MouseEventHandler(butonlogin_MouseEnter);
            butonlogin.MouseLeave += new MouseEventHandler(butonlogin_MouseLeave);
            butonlogin.MouseLeftButtonDown += new MouseButtonEventHandler(butonlogin_MouseLeftButtonDown);
            #endregion
            #region Error
            err = new Canvas()
            {
                Background = new SolidColorBrush(Color.FromArgb(0xFF, 0xcc, 0xdf, 0xf5)),
                Opacity = .43,
                Width = 250,
                Height = 70,
                Clip = new RectangleGeometry()
                {
                    RadiusX = 10,
                    RadiusY = 10,
                    Rect = new Rect(0, 0, 250, 70)
                },
                Margin = new Thickness(left2, 420, 3, 10),
                Visibility = Visibility.Collapsed
            };
            errtrans = new Canvas() { Background = new SolidColorBrush(Colors.Transparent), Width = 250, Height = 70, Margin = new Thickness(left2, 420, 3, 10),Visibility = Visibility.Collapsed };
            Image img2 = new Image() { Source = new BitmapImage(new Uri("DesignImages/triunghi.png", UriKind.Relative)), Width = 26, Height = 26, Opacity = 1, OpacityMask = new SolidColorBrush(Colors.Black), Margin = new Thickness(10, 4, 0, 0) };
            TextBlock errtext = new TextBlock() { Text = "Error", FontFamily = new FontFamily("tahoma"), FontSize = 18, FontWeight = FontWeights.Bold, Margin = new Thickness(43, 6, 0, 0) };
            errrortext = new TextBlock() { Text = "", FontFamily = new FontFamily("tahoma"), FontSize = 12, Margin = new Thickness(20, 34, 0, 0) };
            errtrans.Children.Add(img2); errtrans.Children.Add(errtext); errtrans.Children.Add(errrortext);
            RegisterMeniu.Children.Add(err);
            RegisterMeniu.Children.Add(errtrans);
            #endregion
            #region Avionas catre alta zona
            /*ret = new Canvas()
            {
                Background = new SolidColorBrush(Color.FromArgb(0xFF, 0xcc, 0xdf, 0xf5)),
                Opacity = .47,
                Width = 200,
                Height = 50,
                Clip = new RectangleGeometry()
                {
                    RadiusX = 10,
                    RadiusY = 10,
                    Rect = new Rect(0, 0, 250, 40)
                },
                Margin=new Thickness(555,5,3,10),
                Cursor=Cursors.Hand
            };
            ret.MouseLeftButtonDown += new MouseButtonEventHandler(ret_MouseLeftButtonDown);
            Image img = new Image() { Source = new BitmapImage(new Uri("DesignImages/avion.png", UriKind.Relative)), Width = 50, Height = 26, Opacity=1, OpacityMask=new SolidColorBrush(Colors.Black) };
            ret.Children.Add(img);
            Canvas.SetLeft(img, 5);
            Canvas.SetTop(img, 7);
            RegisterMeniu.Children.Add(ret);
            TextBlock text = new TextBlock() { Text = "Another Region", FontSize = 20, Margin = new Thickness(56, 7, 0, 0), FontFamily = new FontFamily("Tahoma") };
            ret.Children.Add(text);*/
            #endregion
            timmer = new DispatcherTimer() { Interval = new TimeSpan(0, 0, 0, 0, 200) };
            timmer.Tick += new EventHandler(timmer_Tick);

            #region Choose your region
            tbinit = new TextBlock() { Text = "Choose your region", FontFamily = new FontFamily("Tahoma"), FontSize = 22, FontWeight = FontWeights.SemiBold, Foreground = new SolidColorBrush(Colors.White), Margin = new Thickness(508, 50, 0, 0) };
            CanPrincipal.Children.Add(tbinit);
            RegionChooserTimmer = new DispatcherTimer() { Interval = new TimeSpan(0, 0, 0, 0, 100) };
            RegionChooserTimmer.Tick += new EventHandler(RegionChooserTimmer_Tick);
            RegionChooserTimmer.Start();
            #endregion
        }
Пример #2
0
        void IncarcaAnimale()
        {
            lupa.Visibility = Visibility.Collapsed;
            
            CRCuvant.Ascunde();
            CRRegiune.Ascunde();
            CRQA.Ascunde();
            search.Ascunde();
            lol.Ascunde();
            canvas2.Children.Remove(sv);
            #region ButoanDesSusNormal
            CBuy.Children.Clear();
            CBuy.AddTextBlock(new TextBlock(), "Buy", 23, 20, 10, "#FF959906");
            CBuy.Border(new CornerRadius(0, 0, 0, 0), "#00000000", new Thickness(1), 80, 60);
            Buy.Height = 59;
            CSell.Children.Clear();
            CSell.AddTextBlock(new TextBlock(), "Sell", 23, 20, 10, "#FF959906");
            CSell.Border(new CornerRadius(0, 0, 0, 0), "#00000000", new Thickness(1), 80, 60);
            Sell.Height = 59;
            #endregion
            mousepresstrades = true;
            mousepressbuy = mousepresssell = false;

            try
            {
                if (adauga == true)
                {
                    #region Canvasu din Stanga


                    CreateOffer.Background = new SolidColorBrush(Colors.Transparent);
                    CreateOffer.Width = 200;
                    CreateOffer.Height = 400;
                    canvas2.Children.Add(CreateOffer);
                    Canvas.SetLeft(CreateOffer, 15);
                    Canvas.SetTop(CreateOffer, 100);
                    TextBlock t = new TextBlock() { Text = "Create an offer", FontSize = 17, FontFamily = new FontFamily("Tahoma"), Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x7d, 0x91, 0x96)) };
                    CreateOffer.Children.Add(t);
                    Canvas.SetLeft(t, 5);
                    Canvas.SetTop(t, 0);
                    #endregion Canvasu din stanga
                    #region SellBuy
                    ControlCuColturiRotunde CRBuySell = new ControlCuColturiRotunde(CreateOffer, 206, 39, 0, 40, false, 1);
                    CRBuySell.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
                    CRBuySell.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
                    CRBuySell.Colturi(10, 10, new Rect(0, 0, 206, 38));
                    CRBuySell.AddTextBlock(new TextBlock(), "I want to:", 15, 5, 10, null);


                    ComboBoxItem cbiBuySell = new ComboBoxItem();
                    cbiBuySell.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                    cbiBuySell.Content = "Buy";

                    cbiBuySell.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
                    cbBuySell.Width = 120;
                    cbBuySell.Items.Add(cbiBuySell);
                    cbiBuySell = new ComboBoxItem();
                    cbiBuySell.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                    cbiBuySell.Content = "Sell";
                    cbBuySell.Items.Add(cbiBuySell);

                    cbBuySell.SelectedIndex = 0;
                    cbBuySell.Style = (Style)Application.Current.Resources["ComboBoxStyle1"];

                    CRBuySell.AddDropDown(cbBuySell, "#FF000000", "#00000000", 15, 85, 7);

                    cbBuySell.MouseEnter += new MouseEventHandler(cb_MouseEnter);
                    cbBuySell.MouseLeave += new MouseEventHandler(cb_MouseLeave);

                    #endregion BuySell
                    #region Type
                    ControlCuColturiRotunde CRType = new ControlCuColturiRotunde(CreateOffer, 206, 39, 0, 90, false, 1);
                    CRType.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
                    CRType.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
                    CRType.Colturi(10, 10, new Rect(0, 0, 206, 38));
                    CRType.AddTextBlock(new TextBlock(), "Type:", 15, 5, 10, null);




                    ComboBoxItem cbiType = new ComboBoxItem();
                    cbiType.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                    cbiType.Content = "Fauna";
                    cbiType.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));

                    cbType.Items.Add(cbiType);

                    cbiType = new ComboBoxItem();
                    cbiType.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                    cbiType.Content = "Vegetation";

                    cbType.Items.Add(cbiType);

                    CRType.AddDropDown(cbType, "#FF000000", "#00000000", 15, 55, 7);
                    cbType.Width = 150;
                    cbType.SelectedIndex = 0;
                    cbType.Style = (Style)Application.Current.Resources["ComboBoxStyle1"];
                    cbType.MouseEnter += new MouseEventHandler(cbType_MouseEnter);
                    cbType.MouseLeave += new MouseEventHandler(cbType_MouseLeave);
                    #endregion Type
                    #region Species
                    ControlCuColturiRotunde CRSpecies = new ControlCuColturiRotunde(CreateOffer, 206, 39, 0, 140, false, 1);
                    CRSpecies.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
                    CRSpecies.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
                    CRSpecies.Colturi(10, 10, new Rect(0, 0, 206, 38));
                    CRSpecies.AddTextBlock(new TextBlock(), "Species:", 15, 5, 10, null);

                    //string[] ss = new string[] {"sorici","ursulet","cocolino","petrescu","kek","donici","motorga","guster","petarde","ursulet 2","jjj","rexona","for men" };
                    ComboBoxItem cbiSpecies;
                    for (int i = 0; i < Toateanimalele.Count; i++)
                    {
                        cbiSpecies = new ComboBoxItem();
                        cbiSpecies.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                        cbiSpecies.Content = Toateanimalele[i];
                        cbiSpecies.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));

                        cbSpecies.Items.Add(cbiSpecies);
                    }


                    CRSpecies.AddDropDown(cbSpecies, "#FF000000", "#00000000", 15, 75, 7);
                    cbSpecies.Width = 130;
                    //   cbSpecies.SelectedIndex = 0;
                    cbSpecies.Style = (Style)Application.Current.Resources["ComboBoxStyle1"];
                    cbSpecies.MouseEnter += new MouseEventHandler(cbSpecies_MouseEnter);
                    cbSpecies.MouseLeave += new MouseEventHandler(cbSpecies_MouseLeave);
                    #endregion Species
                    #region Quantity
                    ControlCuColturiRotunde CRQuantity = new ControlCuColturiRotunde(CreateOffer, 206, 39, 0, 190, false, 1);
                    CRQuantity.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
                    CRQuantity.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
                    CRQuantity.Colturi(10, 10, new Rect(0, 0, 206, 38));
                    CRQuantity.AddTextBlock(new TextBlock(), "Quantity:", 15, 5, 10, null);
                    CRQuantity.AddTextBox(numar, "", 100, 30, 0, 15, "#FF000000", "#FF000000", "#FF581818", "#FFBE4141", null, true, 90, 5);
                    #endregion Quantity
                    #region Price
                    ControlCuColturiRotunde CRPrice = new ControlCuColturiRotunde(CreateOffer, 206, 39, 0, 240, false, 1);
                    CRPrice.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
                    CRPrice.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
                    CRPrice.Colturi(10, 10, new Rect(0, 0, 206, 38));
                    CRPrice.AddTextBlock(new TextBlock(), "Price:", 15, 5, 10, null);
                    CRPrice.AddTextBox(pret, "", 110, 30, 0, 15, "#FF000000", "#FF000000", "#FF581818", "#FFBE4141", null, true, 50, 5);
                    #endregion Price
                    #region Shipping

                    ControlCuColturiRotunde CRShipping = new ControlCuColturiRotunde(CreateOffer, 206, 39, 0, 290, false, 1);
                    CRShipping.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
                    CRShipping.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
                    CRShipping.Colturi(10, 10, new Rect(0, 0, 206, 38));
                    CRShipping.AddTextBlock(new TextBlock(), "Shipping", 15, 5, 10, null);


                    cbShipping.Width = 120;
                    for (int i = 0; i < ListaFrime.Count; i++)
                    {
                        ComboBoxItem cbiShipping = new ComboBoxItem();
                        cbiShipping.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                        cbiShipping.Content = ListaFrime[i];
                        cbiShipping.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
                        cbShipping.Items.Add(cbiShipping);

                    }
                    cbShipping.SelectedIndex = 0;
                    cbShipping.Style = (Style)Application.Current.Resources["ComboBoxStyle1"];

                    CRShipping.AddDropDown(cbShipping, "#FF000000", "#00000000", 15, 85, 7);

                    cbShipping.MouseEnter += new MouseEventHandler(cbShipping_MouseEnter);
                    cbShipping.MouseLeave += new MouseEventHandler(cbShipping_MouseLeave);
                    #endregion Shipping
                 
                    #region Buton
                    ControlCuColturiRotunde ccr = new ControlCuColturiRotunde(CreateOffer, 206, 39, 0, 340, false, 1);
                    ccr.Colors("#FF969a07", "#FF7a7d04", new Point(0.5, 1), new Point(0.5, 0), null);
                    ccr.Border(new CornerRadius(10, 10, 10, 10), "#FF9fa13a", new Thickness(1), 208, 40);
                    ccr.Colturi(10, 10, new Rect(0, 0, 206, 38));
                    ccr.AddTextBlock(new TextBlock(), "Post offer", 17, 70, 5, "#ffe0e1c0");
                    ccr.Cursor = Cursors.Hand;
                    adaugaoferta = ccr.intoarce();
                    adaugaoferta.MouseLeftButtonDown += new MouseButtonEventHandler(adaugaoferta_MouseLeftButtonDown);
                    #endregion
                    adauga = false;
                }
                else
                {
                    canvas2.Children.Add(CreateOffer);
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
            b.IsBusy = false;
        }
Пример #3
0
        // End Alex

        public LoginForm(Canvas can,Canvas canvas2,MapLayers map,Map mapmare)
         {
            Uri httpAddress = new Uri("http://localhost:11201/Tranzactii.svc");
           // System.ServiceModel.ServiceHost
             mymap = map;
             this.mapMare = mapmare;
            bIndic.Width = 152;
            bIndic.Height = 56;
            this.canvas2=canvas2;
            canvas2.Children.Add(bIndic);
            bIndic.IsBusy=false;
            Canvas.SetLeft(bIndic, canvas2.Width / 2 -78);
            Canvas.SetTop(bIndic, canvas2.Height / 2);
                
            #region Info+Welcome user
            ControlCuColturiRotunde iws = new ControlCuColturiRotunde(can, 205, 200, 0, 10, true, 1);
            iws.AddTextBlockMultiple(new TextBlock()
                                      , 6
                                      , new string[] { " Want to do something for your country?", "GrowRomania is a new game where you", "can grow forest and rise animals in any ", "region. Wild animals ,domestic animals", "and everthing.Join now and play.", "See how to play ..." }
                                      , new string[] { "#FFFFFFFF" }
                                      , new int[] { 11 });
            howto = new ControlCuColturiRotunde(can, 100, 25, 120, 110, true, 1);
            howto.Colors("#FF03132d", "#FF03132d", new Point(0.5, 1), new Point(0.5, 0), 1);
            howto.Colturi(10, 10, new Rect(0, 0, 100, 25));
            howtobutton = howto.intoarce();
            howtobutton.MouseEnter += new MouseEventHandler(howtobutton_MouseEnter);
            howtobutton.MouseLeave += new MouseEventHandler(howtobutton_MouseLeave);
            howto.AddTextBlock(new TextBlock(), " + more info", 12, 5, 4, "#FF8b9205");
            howto.Cursor = Cursors.Hand;
            iws.AddTextBlock(new TextBlock(), "Welcome, Guest!", 20, 0, 190, "#FF8b9205");


            #endregion
            #region Username
            ControlCuColturiRotunde b = new ControlCuColturiRotunde(can, 206, 39, 0, 230, false, 1);
            username = new TextBox();
            b.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
            b.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            b.Colturi(10, 10, new Rect(0, 0, 206, 38));
            b.AddTextBlock(new TextBlock(), "Username:"******"", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", null, true, 95, 5);
            #endregion
            #region Passward
            //adaug canvas pt Password
            ControlCuColturiRotunde c = new ControlCuColturiRotunde(can, 206, 39, 0, 274, false, 1);
            Passordbox = new PasswordBox();
            Passordbox.PasswordChanged += new RoutedEventHandler(pb_PasswordChanged);


            c.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
            c.Border(new CornerRadius(9, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
            c.Colturi(10, 10, new Rect(0, 0, 206, 38));
            c.AddTextBlock(new TextBlock(), "Password:"******"", 100, 30, 0, 14, "#FF992929", "#FF9F1C1C", "#FF581818", "#FFBE4141", null, true, 95, 5);
            #endregion
            #region Loginbutton

            canvasforbutton = new ControlCuColturiRotunde(can, 206, 39, 0, 318, false, 1);
            canvasforbutton.Colors("#FF969a07", "#FF7a7d04", new Point(0.5, 1), new Point(0.5, 0), null);
            canvasforbutton.Border(new CornerRadius(10, 10, 10, 10), "#FF9fa13a", new Thickness(1), 208, 40);
            canvasforbutton.Colturi(10, 10, new Rect(0, 0, 206, 38));
            canvasforbutton.AddTextBlock(new TextBlock(), "Log in", 17, 80, 5, "#ffe0e1c0");
            canvasforbutton.Cursor = Cursors.Hand;
            butonlogin = canvasforbutton.intoarce();
            butonlogin.MouseEnter += new MouseEventHandler(butonlogin_MouseEnter);
            butonlogin.MouseLeave += new MouseEventHandler(butonlogin_MouseLeave);
            butonlogin.MouseLeftButtonDown += new MouseButtonEventHandler(butonlogin_MouseLeftButtonDown);
            #endregion
            #region Register ForgotPassward
            //register forgotpassward
            register = new TextBlock() { Cursor = Cursors.Hand };
            Recover = new TextBlock() { Cursor = Cursors.Hand };
            rf = new ControlCuColturi(can, 205, 40, 0, 365, true, 1);
            rf.AddTextBlock(register, "Register", 14, 0, 5, "#FF8b9205");
            rf.AddTextBlock(new TextBlock(), "|", 14, 62, 5, "#FF8b9205");
            rf.AddTextBlock(Recover, "Recover Password", 14, 74, 5, "#FF8b9205");
            Recover.MouseEnter += new MouseEventHandler(Recover_MouseEnter);
            Recover.MouseLeave += new MouseEventHandler(Recover_MouseLeave);
            register.MouseEnter += new MouseEventHandler(register_MouseEnter);
            register.MouseLeave += new MouseEventHandler(register_MouseLeave);
            register.MouseLeftButtonDown += new MouseButtonEventHandler(register_MouseLeftButtonDown);
            #endregion

            Line l = new Line() { X1 = 0, X2 = 205, Y1 = 400, Y2 = 400, Stroke = new SolidColorBrush(Colors.White), StrokeThickness = 1 };
            can.Children.Add(l);
            #region ConnectWithFacebook
            ConnectwithFacebook = new ControlCuColturi(can, 50, 50, 0, 405, true, 1);
            ConnectwithFacebook.AddImage(new Image(), 30, 30, "DesignImages/1.png", 0, 0);
            ConnectwithFacebook.AddTextBlock(new TextBlock(), "Connect with Facebook", 15, 30, 5, "#FF5a748d");
            Connect = ConnectwithFacebook.intoarce();
            Connect.Cursor = Cursors.Hand;
            Connect.MouseLeftButtonDown += new MouseButtonEventHandler(Connect_MouseLeftButtonDown);
            #endregion
            Line l1 = new Line() { X1 = 0, X2 = 205, Y1 = 440, Y2 = 440, Stroke = new SolidColorBrush(Colors.White), StrokeThickness = 1 };
            can.Children.Add(l1);
            Meniu = can;
            loggedIn = false;

            // Alex
            // Store the current instance for global use
            instance = this;
        }
Пример #4
0
        void adaugaSearch()
        {
            #region Keywords
            KeyWords = new TextBox();
            CRCuvant = new ControlCuColturiRotunde(canvas2, 286, 39, 50, 73, false, 1);
            CRCuvant.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
            CRCuvant.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 288, 40);
            CRCuvant.Colturi(10, 10, new Rect(0, 0, 286, 38));

            CRCuvant.AddTextBlock(new TextBlock(), "Keywords:", 15, 5, 10, null);
            CRCuvant.AddTextBox(KeyWords, "", 170, 30, 0, 15, "#FF000000", "#FF000000", "#FF581818", "#FFBE4141", null, true, 90, 5);
            #endregion Keywords
            #region Regiune
            try
            {
                CRRegiune = new ControlCuColturiRotunde(canvas2, 206, 39, 355, 73, false, 1);
                CRRegiune.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
                CRRegiune.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 208, 40);
                CRRegiune.Colturi(10, 10, new Rect(0, 0, 206, 38));
                CRRegiune.AddTextBlock(new TextBlock(), "Region :", 14, 5, 10, "#FF000000");
                string[] regiuni = new string[] { "Moldova", "Transilvania", "Dobrogea", "Oltenia", "Banat" };

                for (int i = 0; i < regiuni.Length; i++)
                {
                    ComboBoxItem cbiBuySell = new ComboBoxItem();
                    cbiBuySell.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                    cbiBuySell.Content = regiuni[i];
                    cbiBuySell.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
                    cbRegiune.Items.Add(cbiBuySell);
                }
                cbRegiune.Width = 120;
                cbRegiune.SelectedIndex = 0;
                cbRegiune.Style = (Style)Application.Current.Resources["ComboBoxStyle1"];
                CRRegiune.AddDropDown(cbRegiune, "#FF000000", "#00000000", 15, 85, 7);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }

            #endregion Regiune
            #region Buton Search
            search = new ControlCuColturiRotunde(canvas2, 126, 39, 580, 73, false, 1);
            search.Colors("#FF969a07", "#FF7a7d04", new Point(0.5, 1), new Point(0.5, 0), null);
            search.Border(new CornerRadius(10, 10, 10, 10), "#FF9fa13a", new Thickness(1), 128, 40);
            search.Colturi(10, 10, new Rect(0, 0, 126, 38));
            search.AddTextBlock(new TextBlock(), "Search", 17, 40, 5, "#ffe0e1c0");
            search.Cursor = Cursors.Hand;
            Search = search.intoarce();
            Search.MouseLeftButtonDown += new MouseButtonEventHandler(Search_MouseLeftButtonDown);
            #endregion Buton Search
            #region SearchDAQA
            lol = new ControlCuColturiRotunde(canvas2, 26, 29, 10, 130, false, 1);
            lol.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
            lol.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 28, 30);
            lol.Colturi(10, 10, new Rect(0, 0, 26, 28));
            chceck = lol.intoarce();
            chceck.MouseLeftButtonDown += new MouseButtonEventHandler(chceck_MouseLeftButtonDown);

            CRQA = new ControlCuColturiRotunde(canvas2, 326, 39, 50, 123, false, 1);
            CRQA.Colors("#FF465d6a", "#FF5c7084", new Point(0.5, 1), new Point(0.5, 0), null);
            CRQA.Border(new CornerRadius(10, 9, 9, 9), "#FF88B4BB", new Thickness(1), 328, 40);
            CRQA.Colturi(10, 10, new Rect(0, 0, 326, 38));
            CRQA.AddTextBlock(new TextBlock(), "Order by :", 14, 5, 10, "#FF000000");
            string[] alege = new string[] { "Price", "Quantity" };
            for (int i = 0; i < alege.Length; i++)
            {
                ComboBoxItem cbiBuySell = new ComboBoxItem();
                cbiBuySell.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                cbiBuySell.Content = alege[i];
                cbiBuySell.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
                cbSortPQ.Items.Add(cbiBuySell);
            }
            cbSortPQ.Width = 100;
            cbSortPQ.SelectedIndex = 0;
            cbSortPQ.Style = (Style)Application.Current.Resources["ComboBoxStyle1"];
            CRQA.AddDropDown(cbSortPQ, "#FF000000", "#00000000", 15, 85, 7);
            string[] alege2 = new string[] { "Descending", "Ascending" };
            for (int i = 0; i < alege.Length; i++)
            {
                ComboBoxItem cbiBuySell = new ComboBoxItem();
                cbiBuySell.Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x95, 0x99, 0x06));
                cbiBuySell.Content = alege2[i];
                cbiBuySell.Foreground = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00));
                cbSortAD.Items.Add(cbiBuySell);
            }
            cbSortAD.Width = 120;
            cbSortAD.SelectedIndex = 0;
            cbSortAD.Style = (Style)Application.Current.Resources["ComboBoxStyle1"];
            CRQA.AddDropDown(cbSortAD, "#FF000000", "#00000000", 15, 175, 7);
            #endregion
        }