public Comentariu(string text, string date, string username, string image) { InitializeComponent(); if (image != null) { Uri uri = new Uri(image, UriKind.Relative); ImageSource img = new System.Windows.Media.Imaging.BitmapImage(uri); userImage.SetValue(Image.SourceProperty, img); } dateTextBlock.Text = date; userNameTextBlock.Text = username; commentTextBlock.Text = text; linieCanvas.Width = 600; //tb sa stabilesc lungimea liniei in raport cu latimea paginii, nu in pixeli Line L = new Line(); Linie L1 = new Linie(1, 1, linieCanvas.Width, 1, "#FF717577", 1, linieCanvas, L); }
public DonatiiDetalii() { InitializeComponent(); //butonCanvas.Children.Clear(); //ControlCuColturiRotunde Donate = new ControlCuColturiRotunde(butonCanvas, 40, 20, 5, 8, false, 1); //Donate.Colors("#ff8f9305", "#ff8f9305", new Point(0.5, 1), new Point(0.5, 0), null); //Donate.Colturi(10, 10, new Rect(0, 0, 87, 39)); //Donate.AddTextBlock(new TextBlock(), "+ Donate", 20, 10, 10, "#FFFFFFFF"); ControlCuColturiRotunde canvasforbutton = new ControlCuColturiRotunde(butonCanvas, 206, 39, 0, 0, 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, 90, 5, "#ffe0e1c0"); Donatii = canvasforbutton.intoarce(); Line L = new Line(); Linie L1 = new Linie(1, 1, 100, 1, "#FFFFFFFF", 1, lineCanvas, L); lineCanvas.Children.Add(L); // butonCanvas.Children.Add(Donatii); }
public ApasaDonatii(Canvas canvas) { ch = canvas; ch.Children.Clear(); Line l1 = new Line(); Line l2 = new Line(); Line l3 = new Line(); Line l4 = new Line(); // double lung = ch.MaxHeight; // MessageBox.Show(lung.ToString()); Linie lsus = new Linie(0, 0, ch.Width, 0, "#FF8b8e8f", 2.5, ch, l1); Linie lstanga = new Linie(0, 0, 0, ch.Height, "#FF8b8e8f", 2.5, ch, l2); Linie ljos = new Linie(0, ch.Height, ch.Width, ch.Height, "#FF8b8e8f", 2.5, ch, l3); Linie ldreapta = new Linie(ch.Width, 0, ch.Width, ch.Height, "#FF8b8e8f", 2.5, ch, l4); ControlCuColturiRotunde sus = new ControlCuColturiRotunde(ch, ch.Width - 2, 60, 0, 0, false, 1); sus.Colors("#FF252525", "#FF000000", new Point(0.5, 1), new Point(0.5, 0), 1); sus.Border(new CornerRadius(0, 0, 0, 0), "#FF696c6e", new Thickness(1), ch.Width, 62); #region Donations Donations = new ControlCuColturiRotunde(ch, 190, 60, 0, 1, false, 1); Donations.Colors("#FF252525", "#FF000000", new Point(0.5, 1), new Point(0.5, 0), 1); Donations.AddTextBlock(new TextBlock(), "My Donations", 23, 20, 10, "#FF959906"); MyDonations = Donations.intoarce(); MyDonations.MouseEnter += new MouseEventHandler(MyDonations_MouseEnter); MyDonations.MouseLeave += new MouseEventHandler(MyDonations_MouseLeave); MyDonations.MouseLeftButtonDown += new MouseButtonEventHandler(MyDonations_MouseLeftButtonDown); #endregion #region CCampaigns CCampaigns = new ControlCuColturiRotunde(ch, 240, 60, 192, 1, false, 1); CCampaigns.Colors("#FF252525", "#FF000000", new Point(0.5, 1), new Point(0.5, 0), 1); CCampaigns.AddTextBlock(new TextBlock(), "Active Campaigns", 23, 20, 10, "#FF959906"); Campaigns = CCampaigns.intoarce(); Campaigns.MouseEnter += new MouseEventHandler(Campaigns_MouseEnter); Campaigns.MouseLeave += new MouseEventHandler(Campaigns_MouseLeave); Campaigns.MouseLeftButtonDown += new MouseButtonEventHandler(Campaigns_MouseLeftButtonDown); #endregion }
public campanii(string needs,string region, string name,int id,float total, string descriere, String[] Img) { InitializeComponent(); NeedsBlock.Text = needs; totalMoneyTextBlock.Text = total.ToString(); regiuneTextBlock.Text = region; numeCampanieTextBlock.Text = name; this.id = id; S = Img; textDescriere = descriere; Line L = new Line(); Linie L1 = new Linie(1, 1, linieCanvas.Width, 1, "#FF717577", 1, linieCanvas, L); ControlCuColturiRotunde canvasforbutton = new ControlCuColturiRotunde(butonCanvas, 70, 34, 0, 0, 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), 70, 35); canvasforbutton.Colturi(10, 10, new Rect(0, 0, 70, 33)); canvasforbutton.AddTextBlock(new TextBlock(), "+ Donate", 14, 0, 5, "#ffffffff"); camp = canvasforbutton.intoarce(); camp.Visibility = Visibility.Collapsed; }
void donatii_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) {//ce s cu liniile astea?stai putin...e conturul ala de la pagina ch.Children.Clear(); Line l1 = new Line(); Line l2 = new Line(); Line l3 = new Line(); Line l4 = new Line(); // double lung = ch.MaxHeight; // MessageBox.Show(lung.ToString()); Linie lsus = new Linie(0, 0, ch.Width, 0, "#FF8b8e8f", 2.5, ch, l1); Linie lstanga = new Linie(0, 0, 0, ch.Height, "#FF8b8e8f", 2.5, ch, l2); Linie ljos = new Linie(0, ch.Height, ch.Width, ch.Height, "#FF8b8e8f", 2.5, ch, l3); Linie ldreapta = new Linie(ch.Width, 0, ch.Width, ch.Height, "#FF8b8e8f", 2.5, ch, l4); ControlCuColturiRotunde sus = new ControlCuColturiRotunde(ch, ch.Width - 2, 60, 0, 0, false, 1); sus.Colors("#FF252525", "#FF000000", new Point(0.5, 1), new Point(0.5, 0), 1); sus.Border(new CornerRadius(0, 0, 0, 0), "#FF696c6e", new Thickness(1), ch.Width, 62); #region Donations Donations = new ControlCuColturiRotunde(ch, 190, 60, 0, 1, false, 1); Donations.Colors("#FF252525", "#FF000000", new Point(0.5, 1), new Point(0.5, 0), 1); Donations.AddTextBlock(new TextBlock(), "My Donations", 23, 20, 10, "#FF959906"); MyDonations = Donations.intoarce(); MyDonations.MouseEnter += new MouseEventHandler(MyDonations_MouseEnter); MyDonations.MouseLeave += new MouseEventHandler(MyDonations_MouseLeave); MyDonations.MouseLeftButtonDown += new MouseButtonEventHandler(MyDonations_MouseLeftButtonDown); #endregion #region CCampaigns CCampaigns = new ControlCuColturiRotunde(ch, 240, 60, 192, 1, false, 1); CCampaigns.Colors("#FF252525", "#FF000000", new Point(0.5, 1), new Point(0.5, 0), 1); CCampaigns.AddTextBlock(new TextBlock(), "Active Campaigns", 23, 20, 10, "#FF959906"); Campaigns = CCampaigns.intoarce(); Campaigns.MouseEnter += new MouseEventHandler(Campaigns_MouseEnter); Campaigns.MouseLeave += new MouseEventHandler(Campaigns_MouseLeave); Campaigns.MouseLeftButtonDown += new MouseButtonEventHandler(Campaigns_MouseLeftButtonDown); #endregion //tu mai demult mi-ai aratat ca ai pus datagrid acolo, da dar l-am sters pai dar cum il adaugai in mijloc? //stai }