public Padure(Canvas canv,Canvas md) { c = canv; this.md = md; md.Children.Clear(); ServiceReference1.TranzactiiClient tc = new ServiceReference1.TranzactiiClient(bind, endpoint); tc.GetHistoryPadureCompleted += new EventHandler<ServiceReference1.GetHistoryPadureCompletedEventArgs>(tc_GetHistoryPadureCompleted); tc.GetHistoryPadureAsync(); }
public pesteHarta(Canvas can, PlaneProjection p,Image img, Canvas md,MapLayers mapLayer,Map map) { ServiceReference1.TranzactiiClient tc = new ServiceReference1.TranzactiiClient(bind, endpoint); tc.GetHistoryPadureCompleted += new EventHandler<ServiceReference1.GetHistoryPadureCompletedEventArgs>(tc_GetHistoryPadureCompleted); tc.GetHistoryPadureAsync(); // retine = md; this.mapLayer = mapLayer; this.map = map; this.md = md; this.p = p; this.img = img; // Alex code // Preia meniul de login din LoginForm // La intoarcerea din padure sau campie Meniu Dreapta contine MeniuAnimal sau MeniuPlanta // iar la intoarcere este necesar ca in Meniu Dreapta sa se afle PaginaUser // Nu mai e nevoie de toata partea asta /*UIElement[] array = LoginForm.getInstance().getMeniuDreapta(); for (int i = 0; i < array.Length; i++) { if (array[i].GetType() == typeof(PaginaUser)) { Rember = (PaginaUser)array[i]; break; } }*/ md.Children.Clear(); // Preia instanta PaginaUser // Actualizeaza regiunea curenta Rember = PaginaUser.getInstance(); Rember.updateCurrentRegion(); // Adaug manual PaginaUser, altfel apare un bug in care nu am nici un // meniu in partea stanga // Verific daca are deja parinte sa nu dea eroare if (Rember.Parent == null) { this.md.Children.Add(Rember); } // End of Alex code verifica = null; tmr.Interval = new TimeSpan(0, 0, 0, 0, 200); tmr.Tick += new EventHandler(tmr_Tick); tmr.Start(); #region Padure Padure = new Path() { StrokeThickness = 4, }; Padure.MouseLeftButtonDown += new MouseButtonEventHandler(Padure_MouseLeftButtonDown); Padure.Cursor = Cursors.Hand; PathFigure PathFigurepadure = new PathFigure() { StartPoint = new Point(0, 2) }; LineSegment l = new LineSegment() { Point = new Point(2, 333) }; PathFigurepadure.Segments.Add(l); BezierSegment bs = new BezierSegment() { Point1 = new Point(14, 333), Point2 = new Point(30, 310), Point3 = new Point(30, 270) }; PathFigurepadure.Segments.Add(bs); bs = new BezierSegment() { Point1 = new Point(30, 270), Point2 = new Point(30, 250), Point3 = new Point(50, 245) }; PathFigurepadure.Segments.Add(bs); //bs = new BezierSegment() { Point1 = new Point(40, 250), Point2 = new Point(40, 254), Point3 = new Point(85, 235) }; //PathFigurepadure.Segments.Add(bs); l = new LineSegment() { Point = new Point(400, 115) }; PathFigurepadure.Segments.Add(l); bs = new BezierSegment() { Point1 = new Point(400, 115), Point2 = new Point(529, 65), Point3 = new Point(445, 2) }; PathFigurepadure.Segments.Add(bs); l = new LineSegment() { Point = new Point(0, 2) }; PathFigurepadure.Segments.Add(l); PathGeometry geometry = new PathGeometry(); geometry.Figures.Add(PathFigurepadure); Padure.Data = geometry; Padure.Fill = new SolidColorBrush(Colors.Transparent); // Padure.Stroke = new SolidColorBrush(Color.FromArgb(0xFF,0x00,0x00,0x00)); Padure.MouseEnter += new MouseEventHandler(Padure_MouseEnter); Padure.MouseLeave += new MouseEventHandler(Padure_MouseLeave); can.Children.Add(Padure); #endregion canv = can; #region Raul miscator #region Sus el = new Path(); BezierSegment b; PathFigure pf; PathGeometry j; el.Fill = new SolidColorBrush(Color.FromArgb(0x55, 0x0a, 0x76, 0xd1)); //el.Fill = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00)); el.Effect = hh; pf = new PathFigure() { StartPoint = new Point(500, 2) }; b = new BezierSegment() { Point1 = new Point(500, 2), Point2 = new Point(600, 70), Point3 = new Point(430, 140) }; pf.Segments.Add(b); LineSegment ls = new LineSegment() { Point = new Point(420, 130) }; pf.Segments.Add(ls); b = new BezierSegment() { Point1 = new Point(420, 130), Point2 = new Point(550, 70), Point3 = new Point(480, 2) }; pf.Segments.Add(b); j = new PathGeometry(); j.Figures.Add(pf); el.Data = j; canv.Children.Add(el); #endregion mijloc = new Path(); // mijloc.Fill = new SolidColorBrush(Color.FromArgb(0x55, 0x0a, 0x76, 0xd1)); mijloc.StrokeThickness = 3; mijloc.Stroke = new SolidColorBrush(Color.FromArgb(0xFF, 0x00, 0x00, 0x00)); // mijloc.Fill = new SolidColorBrush(Color.FromArgb(0x99, 0x0d, 0x74, 0xd1)); // mijloc.Effect = hh; pf = new PathFigure() { StartPoint = new Point(370, 150) }; b = new BezierSegment() { Point1 = new Point(370, 150), Point2 = new Point(400, 190), Point3 = new Point(330, 185) }; pf.Segments.Add(b); ls = new LineSegment() { Point = new Point(320, 175) }; pf.Segments.Add(ls); b = new BezierSegment() { Point1 = new Point(320, 175), Point2 = new Point(260, 170), Point3 = new Point(380, 150) }; pf.Segments.Add(b); j = new PathGeometry(); j.Figures.Add(pf); mijloc.Data = j; canv.Children.Add(mijloc); #endregion AdaugCampie(); }
void Buy_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { //scrollViewer1.Content = b; if (VerifyStatistic == false) { ServiceReference1.TranzactiiClient wcf = new ServiceReference1.TranzactiiClient(bind, endpoint); wcf.StatisticaAnimalCompleted += new EventHandler<ServiceReference1.StatisticaAnimalCompletedEventArgs>(wcf_StatisticaAnimalCompleted); wcf.StatisticaAnimalAsync(11, 0); VerifyStatistic = true; b.IsBusy = true; } else { b.IsBusy = true; Statistics(); } #region Aranjeaza mousepressbuy = true; mousepresssell = mousepresstrades = false; Buton.Children.Clear(); Buton.AddTextBlock(new TextBlock(), "History", 23, 20, 10, "#FF959906"); Buton.Border(new CornerRadius(0, 0, 0, 0), "#00000000", new Thickness(1), 160, 60); MyTrades.Height = 59; CSell.Children.Clear(); CSell.AddTextBlock(new TextBlock(), "Statistics", 23, 20, 10, "#FF959906"); CSell.Border(new CornerRadius(0, 0, 0, 0), "#00000000", new Thickness(1), 80, 60); Sell.Height = 59; #endregion }
void MyTrades_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { //scrollViewer1.Content = b; if (VerifyHistory == false) { ServiceReference1.TranzactiiClient wcf = new ServiceReference1.TranzactiiClient(bind, endpoint); wcf.PreiaDecesCompleted += new EventHandler<ServiceReference1.PreiaDecesCompletedEventArgs>(wcf_PreiaDecesCompleted); wcf.PreiaDecesAsync(ID,11); b.IsBusy = true; VerifyHistory = true; } else { History(); b.IsBusy = true; } }
private void Upgrades_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { ServiceReference1.TranzactiiClient tc = new ServiceReference1.TranzactiiClient(bind,endpoint); tc.GetProceduraUpgradesCompleted += new EventHandler<ServiceReference1.GetProceduraUpgradesCompletedEventArgs>(tc_GetProceduraUpgradesCompleted); tc.GetProceduraUpgradesAsync(11); }
private void Donations_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (canvas2.Children.Contains(sd)) { canvas2.Children.Clear(); canvas2.Children.Add(map); } if (RealGame == false) { bInidic.IsBusy = true; ServiceReference1.TranzactiiClient tc = new ServiceReference1.TranzactiiClient(bind, endpoint); tc.HartaCuCampaniiCompleted += new EventHandler<ServiceReference1.HartaCuCampaniiCompletedEventArgs>(tc_HartaCuCampaniiCompleted); tc.HartaCuCampaniiAsync(); } else { map.Children.Clear(); map.Children.Add(mymap.RomaniaMap()); mymap.lol(); Donations.Text = "Donation"; RealGame = false; } }
private void News_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { PlaneProjection p = (PlaneProjection)canvas2.Projection; if (p != null) { if (p.RotationY < 270) p.RotationY = 0; canvas2.Projection = p; } ServiceReference1.TranzactiiClient tc = new ServiceReference1.TranzactiiClient(bind, endpoint); tc.GetStiriCompleted += new EventHandler<ServiceReference1.GetStiriCompletedEventArgs>(tc_GetStiriCompleted); tc.GetStiriAsync(); }