void btnUp_MouseDown(object sender, MouseEventArgs e) { RoundedButton bt = (RoundedButton)sender; if (bt.Name.Contains("Up")) { bt.Image = Properties.Resources.ico_list_up_P; } else { bt.Image = Properties.Resources.ico_list_dn_P; } }
public MultiselectViewCell() { /* Rounded Icon with the First letter of the Text*/ // I used a rounded button render I implemented before, but I know we could use a more simple control // as a stacklayout with a label inside it. RoundedButton roundedBtn = new RoundedButton(); roundedBtn.SetBinding(RoundedButton.TextProperty, "TextInitial"); roundedBtn.VerticalOptions = LayoutOptions.Center; roundedBtn.TextColor = Color.White; roundedBtn.BorderRadius = 120; roundedBtn.WidthRequest = 40; roundedBtn.HeightRequest = 40; roundedBtn.Margin = new Thickness(16, 8, 16, 8); roundedBtn.SetBinding(RoundedButton.BackgroundColorProperty, new Binding("CyrcleColor", BindingMode.OneWay)); /* Badge - source code from : https://gist.github.com/rudyryk/8cbe067a1363b45351f6 */ // On this way the refresh is a bit slow and blink all the listView (researching) //StackLayout cyrcleCont = new StackLayout(); //cyrcleCont.VerticalOptions = LayoutOptions.Center; //Badge cyrcleIcon = new Badge(40,15); //cyrcleIcon.SetBinding(Badge.TextProperty, "TextInitial"); //cyrcleIcon.VerticalOptions = LayoutOptions.Center; //cyrcleIcon.Margin = new Thickness(16, 8, 16, 8); ////cyrcleIcon.SetBinding(Badge.IsVisibleProperty, "BadgeIsVisible"); //cyrcleIcon.SetBinding(Badge.BoxColorProperty, new Binding("CyrcleColor", BindingMode.OneWay)); //cyrcleCont.Children.Add(cyrcleIcon); /* Label to show the main Text */ var textLabel = new Label(); textLabel.SetBinding(Label.TextProperty, "Text"); textLabel.VerticalOptions = LayoutOptions.Center; textLabel.HorizontalOptions = LayoutOptions.FillAndExpand; /* Container for the previous views */ var stack = new StackLayout(); stack.Orientation = StackOrientation.Horizontal; // Element horizontal anordnen stack.HorizontalOptions = LayoutOptions.FillAndExpand; stack.SetBinding(StackLayout.BackgroundColorProperty, new Binding("SelectedColor", BindingMode.OneWay)); //stack.Children.Add(cyrcleCont); stack.Children.Add(roundedBtn); stack.Children.Add(textLabel); this.View = stack; }
protected override void OnElementChanged(ElementChangedEventArgs <Xamarin.Forms.Button> e) { RoundedButton customFram = e.NewElement as RoundedButton; // Create a drawable for the button's normal state _normal = new Android.Graphics.Drawables.GradientDrawable(); _normal.SetColor(customFram.BackgroundColor.ToAndroid()); _normal.SetStroke(customFram.BorderWidth, customFram.OutlineColor.ToAndroid()); _normal.SetCornerRadius(customFram.BorderRadius); SetBackgroundColor(customFram.BackgroundColor.ToAndroid()); base.OnElementChanged(e); }
internal void removeSequence() { List <OPDHistoryModel> list = service.GetByStatus(OPD_STATUS.Pending.ToString()); for (int i = 0; i < 6; i++) { RoundedButton tbx = this.Controls.Find("lbl" + (i + 1), true).FirstOrDefault() as RoundedButton; if (tbx.Text == list[i].Sequence.ToString()) { tbx.Text = "--"; tbx.Visible = false; } tbx.Update(); } }
internal void removeSequence(int sequence) { getPatient(); labelSize(); for (int i = 0; i < 6; i++) { RoundedButton tbx = this.Controls.Find("lbl" + (i + 1), true).FirstOrDefault() as RoundedButton; if (tbx.Text == sequence.ToString()) { tbx.Text = "--"; tbx.Visible = false; } tbx.Update(); } }
void btnUp_MouseUp(object sender, MouseEventArgs e) { if (!DisableScroll) { RoundedButton bt = (RoundedButton)sender; if (bt.Name.Contains("Up")) { DoUpDown(true); } else { DoUpDown(false); } } }
void UpDown_Click(object sender, EventArgs e) { RoundedButton bt = (RoundedButton)sender; if (bt.Tag == null || !(bool)bt.Tag) { bt.Tag = true; } else { bt.Tag = false; } DoScroll(bt.Name.Contains("Up")); }
void btnUp_MouseUp(object sender, MouseEventArgs e) { RoundedButton bt = (RoundedButton)sender; if (bt.Name.Contains("Up")) { bt.Image = Properties.Resources.ico_list_up; DoScroll(true); } else { bt.Image = Properties.Resources.ico_list_dn; DoScroll(false); } }
public CustomMessageBox(string text, MessageBoxButton buttons) { InitializeComponent(); Text = text; MessageText.Text = text; MessageText.TextWrapping = TextWrapping.Wrap; MessageText.Padding = new Thickness(10); switch (buttons) { case MessageBoxButton.OK: RoundedButton button = new RoundedButton("OK", new SolidColorBrush(ColorScheme.GlobalBlue), new SolidColorBrush(ColorScheme.MenuLight)); button.Clicked += (s, ea) => { OKButtonClicked?.Invoke(this, EventArgs.Empty); }; DockPanel.SetDock(button, Dock.Right); ButtonsContainer.Children.Add(button); break; case MessageBoxButton.YesNo: RoundedButton yesbutton = new RoundedButton("Tak", new SolidColorBrush(ColorScheme.GlobalBlue), new SolidColorBrush(ColorScheme.MenuLight)); yesbutton.Clicked += (s, ea) => { YesButtonClicked?.Invoke(this, EventArgs.Empty); }; DockPanel.SetDock(yesbutton, Dock.Right); ButtonsContainer.Children.Add(yesbutton); RoundedButton nobutton = new RoundedButton("Nie", new SolidColorBrush(ColorScheme.GlobalBlue), new SolidColorBrush(ColorScheme.MenuLight)); nobutton.Clicked += (s, ea) => { NoButtonClicked?.Invoke(this, EventArgs.Empty); }; DockPanel.SetDock(nobutton, Dock.Right); ButtonsContainer.Children.Add(nobutton); break; } }
private static RoundedButton GetNumPadButton(int buttonPosition, Form form) { RoundedButton button = new RoundedButton(form); int startX = 759; int y = 77; int heightWidth = 26; button.Height = heightWidth; button.Width = heightWidth; Point location = new Point(startX + (buttonPosition * 36), y); button.Location = location; button.BackColor = Color.Transparent; button.Cursor = Cursors.Hand; button.FlatStyle = FlatStyle.Flat; button.FlatAppearance.BorderSize = 0; buttons.Add(button); return(button); }
public FileUploadPage(MainPage mainPage) { _mainPage = mainPage; InitializeComponent(); InitializeForm(); CreateMainPanel(); CreateDragDropPanel(); RoundedButton btn = new RoundedButton(60, 30); btn.Location = new Point(500, 150); btn.Size = new Size(100, 50); this.Controls.Add(btn); //Test(); }
private static RoundedButton GetMediaScreenButton(Form form) { RoundedButton button = new RoundedButton(form); int x = 638; int y = 4; int heightWidth = 75; button.Height = heightWidth; button.Width = heightWidth; Point location = new Point(x, y); button.Location = location; button.BackColor = Color.Transparent; button.Cursor = Cursors.Hand; button.FlatStyle = FlatStyle.Flat; button.FlatAppearance.BorderSize = 0; button.CornerRadius = 75; button.IsMediaButton = true; buttons.Add(button); return(button); }
public Button CreateButtonWithImage(Image btnImage, string btnName, string btnText, int btnLeft, int btnTop, int btnWidth, int btnHeight, int borderSize, int radiusValue, int fontSize = 12, FontStyle fontStyle = FontStyle.Regular, Color foreColor = default(Color), ContentAlignment textAlign = ContentAlignment.MiddleCenter, int diffValue = 1) { RoundedButton btn = new RoundedButton(); btn.Name = btnName; btn.text = btnText; btn.ForeColors = foreColor; btn.BackgroundImage = btnImage; btn.BackgroundImageLayout = ImageLayout.Stretch; btn.Location = new Point(btnLeft, btnTop); btn.Size = new Size(btnWidth, btnHeight); btn.Font = new Font("Seri", fontSize, fontStyle); btn.TextAlign = ContentAlignment.MiddleCenter; btn.radiusValue = radiusValue; btn.borderColor = Color.Transparent; btn.borderSize = borderSize; btn.TabStop = false; btn.diffValue = diffValue; btn.FlatStyle = FlatStyle.Flat; btn.FlatAppearance.BorderColor = Color.FromArgb(255, 255, 255, 255); return(btn); }
void btnUp_MouseUp(object sender, MouseEventArgs e) { RoundedButton bt = (RoundedButton)sender; if (bt.Name.Contains("Up")) { bt.Image = Properties.Resources.ico_list_up; if (m_scrollPos < 0) { m_scrollPos++; ScrollPaysIntoView(); } } else { bt.Image = Properties.Resources.ico_list_dn; if (m_scrollPos > m_maxScroll) { m_scrollPos--; ScrollPaysIntoView(); } } }
private void AddCancelButton() { if (CancellationTokenSource != null) { var cancelButton = AlertStaticButtons.CancelButton(); var roundedCancelButton = new RoundedButton { Anchor = AnchorStyles.None, MaximumSize = new Size(130, 60), MinimumSize = new Size(130, 60), Name = cancelButton.Title, Size = new Size(130, 60), TabIndex = 0, Text = cancelButton.Title, UseVisualStyleBackColor = true, ButtonPenColour = cancelButton.PenColour, Tag = (int)cancelButton.DialogResult }; roundedCancelButton.Click += CancelButton_Click; AddButtonsLayoutWithCancelButton(roundedCancelButton); } }
private void UpdateUi(RoundedButton view) { // Prefer font set through Font property. if (view.Font == Font.Default) { if (view.FontSize > 0) { this.Control.Font = UIFont.FromName(this.Control.Font.Name, (float)view.FontSize); } if (!string.IsNullOrEmpty(view.FontFamily)) { var fontName = Path.GetFileNameWithoutExtension(view.FontFamily); var font = UIFont.FromName(fontName, this.Control.Font.PointSize); if (font != null) { this.Control.Font = font; } } } else { try { var font = UIFont.FromName(FontHelper.GetFontName(view.FontFamily), (float)view.FontSize); if (font != null) { this.Control.Font = font; } } catch (Exception ex) { var x = ex; } } }
/// <summary> /// 单击 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ccButtonGrid1_BtnClickEvent(object sender, EventArgs e) { object obj = sender; RoundedButton btn = obj as RoundedButton; if (btn != null) { if (btn.Text.Equals("翻 页")) { this._mCurrDishTablePage++; if (_mCurrDishTablePage > _mMaxDishTablePage) { _mCurrDishTablePage = 0; } } else { DishTables_Click((int)btn.Tag); } } this.FillDishTableData(); }
protected override void Init() { Content = new RoundedButton(100); }
public async void generate() { voigra = true; if (sleden == 5) { sleden = 1; } if (sleden == 1) { podatoci1 = ""; } if (sleden == 2) { podatoci2 = ""; } if (sleden == 3) { podatoci3 = ""; } if (sleden == 4) { podatoci4 = ""; } gener = false; button85.Enabled = false; bool flag2 = false; int n; button83.Enabled = false; textBox3.Enabled = false; button84.Enabled = false; if (c == 0) { izbrani.Text = "Избрани: 0"; } if (label9.Text != "" && int.TryParse(label9.Text, out n)) { flag2 = true; p0.ForeColor = Color.Red; k0.ForeColor = Color.Red; d0.ForeColor = Color.Red; d5.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 4)).ToString(); d4.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 2.5)).ToString(); d6.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 7)).ToString(); d7.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 10)).ToString(); d8.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 20)).ToString(); d9.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 30)).ToString(); d10.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 50)).ToString(); d11.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 80)).ToString(); d12.Text = (Convert.ToInt32(Convert.ToInt32(label9.Text) * 100)).ToString(); isplata = Convert.ToInt32((Convert.ToInt32(label9.Text) * 0.4)); isp.Text = "Вкупна добивка: " + isplata.ToString(); d0.Text = isplata.ToString(); } Random rnd = new Random(); flowLayoutPanel2.Controls.Clear(); for (int i = 0; i < 25; i++) { //Thread.Sleep(100); int numb = rnd.Next(1, 81); bool flag = true; while (flag) { if (!checck(numb)) { numb = rnd.Next(1, 81); flag = true; } else { flag = false; } } pogodoci.Text = "Погодоци: " + pogodocifinal.ToString(); randoms[c1++] = numb; if (sleden == 1) { if (i != 24) { podatoci1 += numb.ToString() + " ";; } else { } } if (sleden == 2) { if (i != 24) { podatoci2 += numb.ToString() + " ";; } else { podatoci2 += numb.ToString(); } } if (sleden == 3) { if (i != 24) { podatoci3 += numb.ToString() + " ";; } else { podatoci3 += numb.ToString(); } } if (sleden == 4) { if (i != 24) { podatoci4 += numb.ToString() + " "; } else { podatoci4 += numb.ToString(); } } if (check2(numb)) { foreach (Button b in flowLayoutPanel3.Controls.OfType <Button>()) { if (b.Text == numb.ToString()) { b.BackColor = Color.Red; } } RoundedButton b1 = new RoundedButton(40, Color.Red); b1.Text = numb.ToString(); b1.Location = new System.Drawing.Point(200, 200); b1.Size = new System.Drawing.Size(40, 40); b1.Enabled = false; b1.FlatStyle = FlatStyle.Flat; b1.FlatAppearance.BorderColor = Color.White; b1.BackColor = Color.Red; flowLayoutPanel2.Controls.Add(b1); } else { RoundedButton b1 = new RoundedButton(40, Color.Red); b1.Text = numb.ToString(); b1.Location = new System.Drawing.Point(200, 200); b1.Size = new System.Drawing.Size(40, 40); b1.Enabled = false; b1.FlatStyle = FlatStyle.Flat; b1.FlatAppearance.BorderColor = Color.White; b1.BackColor = Color.Yellow; flowLayoutPanel2.Controls.Add(b1); } if (check2(numb) && c >= 4 && flag2) { pogodocifinal += 1; pogodoci.Text = "Погодоци: " + pogodocifinal.ToString(); if (pogodocifinal <= 3) { isplata = Convert.ToInt32(Convert.ToInt32(label9.Text) * 0.4); isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 0.4).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); //d0.Text = isplata.ToString(); } if (pogodocifinal == 4) { isplata = Convert.ToInt32(Convert.ToInt32(label9.Text) * 2.5); isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 2.5).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p0.ForeColor = Color.White; k0.ForeColor = Color.White; d0.ForeColor = Color.White; p4.ForeColor = Color.Red; k4.ForeColor = Color.Red; d4.ForeColor = Color.Red; } if (pogodocifinal == 5) { isplata = Convert.ToInt32(label9.Text) * 4; isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 4).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p4.ForeColor = Color.White; k4.ForeColor = Color.White; d4.ForeColor = Color.White; p5.ForeColor = Color.Red; k5.ForeColor = Color.Red; d5.ForeColor = Color.Red; } if (pogodocifinal == 6) { isplata = Convert.ToInt32(label9.Text) * 7; isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 7).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p5.ForeColor = Color.White; k5.ForeColor = Color.White; d5.ForeColor = Color.White; p6.ForeColor = Color.Red; k6.ForeColor = Color.Red; d6.ForeColor = Color.Red; } if (pogodocifinal == 7) { isplata = Convert.ToInt32(label9.Text) * 10; isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 10).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p6.ForeColor = Color.White; k6.ForeColor = Color.White; d6.ForeColor = Color.White; p7.ForeColor = Color.Red; k7.ForeColor = Color.Red; d7.ForeColor = Color.Red; } if (pogodocifinal == 8) { isplata = Convert.ToInt32(label9.Text) * 20; isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 20).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p7.ForeColor = Color.White; k7.ForeColor = Color.White; d7.ForeColor = Color.White; p8.ForeColor = Color.Red; k8.ForeColor = Color.Red; d8.ForeColor = Color.Red; } if (pogodocifinal == 9) { isplata = Convert.ToInt32(label9.Text) * 30; isp.Text = "Вкупна добивка " + (Convert.ToInt32(label9.Text) * 30).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p8.ForeColor = Color.White; k8.ForeColor = Color.White; d8.ForeColor = Color.White; p9.ForeColor = Color.Red; k9.ForeColor = Color.Red; d9.ForeColor = Color.Red; } if (pogodocifinal == 10) { isplata = Convert.ToInt32(label9.Text) * 50; isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 50).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p9.ForeColor = Color.White; k9.ForeColor = Color.White; d9.ForeColor = Color.White; p10.ForeColor = Color.Red; k10.ForeColor = Color.Red; d10.ForeColor = Color.Red; } if (pogodocifinal == 11) { isplata = Convert.ToInt32(label9.Text) * 80; isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 80).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p10.ForeColor = Color.White; k10.ForeColor = Color.White; d10.ForeColor = Color.White; p11.ForeColor = Color.Red; k11.ForeColor = Color.Red; d11.ForeColor = Color.Red; } if (pogodocifinal == 12) { isplata = Convert.ToInt32(label9.Text) * 100; isp.Text = "Вкупна добивка: " + (Convert.ToInt32(label9.Text) * 100).ToString(); label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); p11.ForeColor = Color.White; k11.ForeColor = Color.White; d11.ForeColor = Color.White; p12.ForeColor = Color.Red; k12.ForeColor = Color.Red; d12.ForeColor = Color.Red; } } else { if (check2(numb)) { pogodocifinal++; } } await Task.Delay(700); if (i == 24) { if (c >= 4 && flag2) { label6.Text = "Бонус: " + (isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))).ToString(); isplata += Convert.ToInt32(isplata * (Convert.ToDouble(pogodocifinal) / Convert.ToDouble(c))); isp.Text = "Вкупна добивка: " + isplata.ToString(); kredit += isplata; } label10.Text = "Кредит: " + kredit.ToString(); label9.Text = ""; //await Task.Delay(5000); nova.Enabled = true; } } c1 = 0; sleden++; voigra = false; }
/// <summary> /// Initializes a new instance of the <see cref="ChoiceBoxController"/> class. /// </summary> /// <param name="element">The element representig the related <see cref="ChoiceBox"/></param> /// <param name="enabled">True if the <see cref="ChoiceBox"/> is modifiable, false otherwise</param> public ChoiceBoxController(ChoiceBox element, bool enabled) : base(enabled) { this.element = element; enabledVal = enabled; if (enabled) { groupPanel = new Panel() { Height = 0, Width = this.Width - (2 * padding) }; Panel checksContainer = new Panel() { Width = groupPanel.Width - 40, Dock = DockStyle.Left }; Panel editContainer = new Panel() { Width = 40, Dock = DockStyle.Right }; groupPanel.Controls.Add(checksContainer); groupPanel.Controls.Add(editContainer); for (int i = 0; i < element.Fields.Length; i++) { RadioButton button = new RadioButton() { Enabled = enabled, Top = groupPanel.Height, Font = new Font("Tahoma", 8, FontStyle.Regular), Text = element.Fields[i].Name, Width = checksContainer.Width }; RoundedButton editButton = new RoundedButton() { Width = 38, Height = button.Height - 2, Top = groupPanel.Height, Left = 1, BackColor = Color.FromArgb(236, 236, 236), BorderColor = Color.FromArgb(146, 146, 146), ClickedBackColor = Color.FromArgb(186, 186, 186), Text = "edit", Font = new Font("Tahoma", 8, FontStyle.Regular), ForeColor = Color.FromArgb(90, 90, 90), BorderSize = 1, CornerRadius = 4 }; groupPanel.Height += button.Height + padding; checksContainer.Controls.Add(button); editContainer.Controls.Add(editButton); button.CheckedChanged += OnCheckedChange; editButton.Click += new EventHandler(OnEditButtonClick); if (element.SelectedIndex == i) { button.Checked = true; editButton.Visible = true; } else { editButton.Visible = false; } } groupPanel.Height -= padding; Content = groupPanel; Title = element.Name; Description = element.Description; } else { resultPanel = new RoundedPanel { BackColor = Color.Transparent, BorderColor = Color.FromArgb(90, 90, 90), BorderSize = 1, CornerRadius = 4, Dock = DockStyle.None, Height = 0 }; int buttonMargin = padding; FieldController controller = FieldFactory.CreateController(element.Fields[element.SelectedIndex], false); RadioButton button = new RadioButton() { Checked = true, Enabled = enabled, Font = new Font("Tahoma", 8, FontStyle.Regular), Left = resultPanel.CornerRadius + 1, Text = element.Fields[element.SelectedIndex].Name, Top = buttonMargin }; buttonMargin += button.Height; resultPanel.Controls.Add(button); (controller as Control).Top = buttonMargin; (controller as Control).Left = resultPanel.CornerRadius + 1; (controller as Control).Width = resultPanel.Width - (2 * (resultPanel.CornerRadius + 1)); (controller as Control).Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top; buttonMargin += (controller as Control).Height + padding; resultPanel.Controls.Add(controller as Control); resultPanel.Height += buttonMargin + (2 * padding); Content = resultPanel; Title = element.Name; Description = element.Description; } }
private void ConfigureScreen() { BackgroundColor = Color.White; Progress generalProgress = new Progress(ViewModel.TotalSteps, ViewModel.Step) { Margin = new Thickness(5, 5, 5, 0) }; Label directionText = new Label() { TextColor = Color.Black, FontSize = 18, FontAttributes = FontAttributes.Bold, Text = DirectionMainInstruction, HorizontalTextAlignment = TextAlignment.Center, }; RoundedBorderedLabel mainDirectionLabel = new RoundedBorderedLabel(directionText, Color.Transparent, 0, ColorMainInstruction, 7) { //BackgroundColor = ColorMainInstruction, HorizontalOptions = LayoutOptions.FillAndExpand, Margin = new Thickness(30, 0), VerticalOptions = LayoutOptions.Start }; mainDirectionLabel.Content.HorizontalOptions = mainDirectionLabel.HorizontalOptions; Label secondDirectionLabel = new Label() { HorizontalTextAlignment = TextAlignment.Center, FontSize = 15, Text = DirectionSecondInstruction, TextColor = Color.Black, }; UI.Animation directionGIF = new UI.Animation(ViewModel.Direction); Label accelerationText = new Label() { TextColor = Color.Black, FontSize = 18, FontAttributes = FontAttributes.Bold, Text = AccelerationInstruction, HorizontalTextAlignment = TextAlignment.Center, }; RoundedBorderedLabel accelerationLabel = new RoundedBorderedLabel(accelerationText, Color.Transparent, 0, ColorPalette.ExtraLightGray, 7) { HorizontalOptions = LayoutOptions.FillAndExpand, WidthRequest = App.ScreenWidth, Margin = new Thickness(30, 0), }; accelerationLabel.Content.HorizontalOptions = accelerationLabel.HorizontalOptions; UI.Animation accelerationGIF = new UI.Animation(ViewModel.Acceleration); int ciclo = 0; if (ViewModel.Direction != SteeringWheel.CentrallyAligned) { accelerationGIF.KeepAnimating = false; accelerationGIF.Completed += () => { ciclo++; if (ciclo <= 1) { directionGIF.StartRedrawing(); } }; directionGIF.Completed += () => { if (ciclo <= 1) { accelerationGIF.StartRedrawing(); } }; } else { accelerationGIF.Completed += () => { ciclo++; if (ciclo <= 1) { accelerationGIF.StartRedrawing(); } }; } Progress = new CurvedProgressBar() { HeightRequest = App.ScreenHeight / 5 * 1.2, WidthRequest = App.ScreenWidth }; Progress.SetBinding(CurvedProgressBar.ProgressProperty, new Binding(nameof(ViewModel.Progress))); Progress.SetBinding(CurvedProgressBar.CmsLeftProperty, new Binding(nameof(ViewModel.DistanceLeft))); RoundedButton closeButton = new RoundedButton() { BackgroundColor = ColorPalette.LightBlue, TextColor = Color.White, Text = "X", FontSize = 20, FontAttributes = FontAttributes.Bold, WidthRequest = 40, HeightRequest = 40, Padding = 0, HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.EndAndExpand, Margin = 10, Command = ViewModel.Cancel }; Label ParametrosTest = new Label() { BackgroundColor = ColorPalette.ExtraLightGray, HorizontalOptions = LayoutOptions.CenterAndExpand, FontSize = 18, FontAttributes = FontAttributes.Bold, VerticalOptions = LayoutOptions.EndAndExpand, Margin = 10, }; RoundedButton nextRound = new RoundedButton() { BackgroundColor = ColorPalette.LightBlue, TextColor = Color.White, Text = "Proxima Etapa".ToUpper(), VerticalOptions = LayoutOptions.Start, HorizontalOptions = LayoutOptions.CenterAndExpand, Margin = new Thickness(15, 10), Padding = new Thickness(30, 13), FontSize = 16, FontAttributes = FontAttributes.Bold, Command = ViewModel.NextRound }; ColumnDefinitions.Add(new ColumnDefinition() { Width = App.ScreenWidth }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Auto) }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Auto) }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Auto) }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Auto) }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); RowDefinitions.Add(new RowDefinition() { Height = new GridLength(App.ScreenHeight / 5 * 1.2, GridUnitType.Absolute) }); Children.Add(generalProgress, 0, 0); Children.Add(mainDirectionLabel, 0, 1); if (StepViewModel.TrainingMode) { Children.Add(ParametrosTest, 0, 2); Children.Add(nextRound, 0, 7); } else { Children.Add(secondDirectionLabel, 0, 2); } Children.Add(directionGIF, 0, 3); Children.Add(accelerationLabel, 0, 4); Children.Add(accelerationGIF, 0, 5); Children.Add(Progress, 0, 6); Children.Add(closeButton, 0, 6); if (App.IsAndroidSDKBelowMarshmallow) { ViewModel.PropertyChanged += (sender, args) => { if (args.PropertyName == nameof(ViewModel.DistanceLeft)) { Progress.CmsLeft = (int)ViewModel.DistanceLeft; } }; } ViewModel.PropertyChanged += (sender, e) => { Device.BeginInvokeOnMainThread(() => { //accelerationText.Text = $"V = {Math.Round(Convert.ToDecimal(DistanceManager.Instance.CurrentSpeed), 2)} KM/H \n"; //ParametrosTest.Text = $"V = {Math.Round(Convert.ToDecimal(StepViewModel.velocidade), 2)} KM/H \n" + // $"P = {Math.Round(StepViewModel.parou1, 0)} CM"; //directionText.Text = $"V = {Math.Round(Convert.ToDecimal(DistanceManager.Instance.CurrentSpeed * 0 + StepViewModel.FilteredSpeed), 2)}"; directionText.HorizontalTextAlignment = TextAlignment.Center; if ((FlowManager.CurrentStep1 == ApplicationStep.ManeuverIII) && ViewModel.curbTouch) { cabeOuNaoCabe = DistanceManager.Instance.CorrectOnCurbColisionTeste(Direction.Left, ApplicationStep.ManeuverIII); if (cabeOuNaoCabe == 1) { directionText.BackgroundColor = Color.Green; mainDirectionLabel.BackgroundColor = Color.Green; } else if (cabeOuNaoCabe == 2) { directionText.BackgroundColor = Color.Gray; mainDirectionLabel.BackgroundColor = Color.Gray; } else { directionText.BackgroundColor = Color.Red; mainDirectionLabel.BackgroundColor = Color.Red; } } else { directionText.BackgroundColor = Color.Transparent; mainDirectionLabel.BackgroundColor = Color.White; } }); }; }
protected void AddButtonsLayout(List <AlertButtonViewModel> buttons) { if (buttons == null || !buttons.Any()) { return; } AddToHeight(100); ButtonsTableLayoutPanel = new Panel { Name = "ButtonsTableLayoutPanel", Dock = DockStyle.Top, Size = new Size(140, 100) }; ButtonsTableLayout = new TableLayoutPanel { Name = "ButtonsTableLayout", Dock = DockStyle.Fill, RowCount = 1, ColumnCount = buttons.Count }; ButtonsTableLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); if (buttons.Count == 1) { ButtonsTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); } else if (buttons.Count == 2) { ButtonsTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); ButtonsTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); } else if (buttons.Count == 3) { ButtonsTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); ButtonsTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 34F)); ButtonsTableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); } int counter = 0; foreach (var button in buttons) { var roundedButton = new RoundedButton { Anchor = AnchorStyles.None, MaximumSize = new Size(130, 60), MinimumSize = new Size(130, 60), Name = button.Title, Size = new Size(130, 60), TabIndex = 0, Text = button.Title, UseVisualStyleBackColor = true, ButtonPenColour = button.PenColour, Tag = (int)button.DialogResult }; roundedButton.Click += Button_Click; ButtonsTableLayout.Controls.Add(roundedButton, counter, 0); counter++; } ButtonsTableLayoutPanel.Controls.Add(ButtonsTableLayout); IncludeButtonsTableLayoutPanel = true; }
protected override void InitializeObjects() { base.InitializeObjects(); // Navigation bar var applicationLogo = new UIImageView(UIImage.FromBundle(@"Images/logo.png")); View.BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile(@"Images/main_background.png").Scale(View.Frame.Size)); applicationLogo.Frame = new CGRect(10, 10, applicationLogo.Image.CGImage.Width, applicationLogo.Image.CGImage.Height); logoutButton = RoundedButtonManager.ButtonInitiaziler("", UIImage.FromFile(@"Images/HomeView/ic_logout.png")); // Hide navigation bar NavigationController.SetNavigationBarHidden(true, false); var topView = new UIView(); topView.AddIfNotNull(applicationLogo, logoutButton); topView.AddConstraints( applicationLogo.WithRelativeWidth(topView, 0.5f), applicationLogo.WithRelativeHeight(topView, 0.18f), applicationLogo.WithSameCenterX(topView), applicationLogo.WithSameCenterY(topView), logoutButton.AtTopOf(topView, 10), logoutButton.AtRightOf(topView), logoutButton.WithRelativeWidth(topView, 0.2f), logoutButton.WithRelativeHeight(topView, 0.4f) ); // Central Board View boardScrollView = CreateSliderBoard(true); buttonContainerView = new UIView(); roadInformationBoardView = new UIView(); buttonContainerView.Frame = new CGRect(0, 0, (boardScrollView.Bounds.Width * EnvironmentInfo.GetValueForGettingWidthButtonsContainer), (boardScrollView.Bounds.Height * 3)); roadInformationBoardView.Frame = new CGRect((boardScrollView.Bounds.Width * EnvironmentInfo.GetValueForGettingWidthRoadInformationContainer), EnvironmentInfo.GetValueForFirstSliderPositionY, (boardScrollView.Bounds.Width * 0.8), (boardScrollView.Bounds.Height * 2.5)); boardScrollView.ContentSize = new CGSize((buttonContainerView.Bounds.Width + roadInformationBoardView.Bounds.Width), boardScrollView.Frame.Height); // Board View - Button Container profileButton = RoundedButtonManager.ButtonInitiaziler("PROFILE", UIImage.FromFile(@"Images/HomeView/ic_home_profile.png"), UIImage.FromFile(@"Images/HomeView/InformationBoard/ic_pointer.png")); payButton = RoundedButtonManager.ButtonInitiaziler("PAY", UIImage.FromFile(@"Images/HomeView/ic_home_pay.png"), UIImage.FromFile(@"Images/HomeView/InformationBoard/ic_pointer.png")); payHistoryButton = RoundedButtonManager.ButtonInitiaziler("PAY HISTORY", UIImage.FromFile(@"Images/HomeView/ic_home_pay_history.png"), UIImage.FromFile(@"Images/HomeView/InformationBoard/ic_pointer.png")); buttonContainerView.AddIfNotNull(profileButton, payButton, payHistoryButton); buttonContainerView.AddConstraints( profileButton.AtTopOf(buttonContainerView, EnvironmentInfo.GetMarginTopButtonsContainer), profileButton.AtLeftOf(buttonContainerView), profileButton.WithRelativeWidth(buttonContainerView, 0.4f), profileButton.WithRelativeHeight(buttonContainerView, 0.6f), payHistoryButton.AtTopOf(buttonContainerView, EnvironmentInfo.GetMarginTopButtonsContainer), payHistoryButton.WithSameCenterX(buttonContainerView), payHistoryButton.WithRelativeWidth(buttonContainerView, 0.4f), payHistoryButton.WithRelativeHeight(buttonContainerView, 0.6f), payButton.AtTopOf(buttonContainerView, EnvironmentInfo.GetMarginTopButtonsContainer), payButton.AtRightOf(buttonContainerView), payButton.WithRelativeWidth(buttonContainerView, 0.4f), payButton.WithRelativeHeight(buttonContainerView, 0.6f) ); // Board View - Road Information Container nextWaypointString = BoardFieldInitializer(UIImage.FromFile(@"Images/HomeView/InformationBoard/ic_nearest_point.png"), "Nearest point in(ml):", (roadInformationBoardView.Bounds.Width * EnvironmentInfo.GetDistanceBetweenLabelAndTextNearestPoint)); geoLabelData = BoardFieldInitializer(UIImage.FromFile(@"Images/HomeView/InformationBoard/ic_location.png"), "Geolocation:", (roadInformationBoardView.Bounds.Width * EnvironmentInfo.GetDistanceBetweenLabelAndTextGeolocation)); tollRoadString = BoardFieldInitializer(UIImage.FromFile(@"Images/HomeView/InformationBoard/ic_tollroad.png"), "Tollroad:", (roadInformationBoardView.Bounds.Width * EnvironmentInfo.GetDistanceBetweenLabelAndTextTollroad)); statusLabel = BoardFieldInitializer(UIImage.FromFile(@"Images/HomeView/InformationBoard/ic_status.png"), "Status:", (roadInformationBoardView.Bounds.Width * EnvironmentInfo.GetDistanceBetweenLabelAndTextStatus)); roadInformationBoardView.AddIfNotNull(nextWaypointString, geoLabelData, tollRoadString, statusLabel); roadInformationBoardView.AddConstraints( nextWaypointString.AtTopOf(roadInformationBoardView, 10), nextWaypointString.AtLeftOf(roadInformationBoardView, 10), nextWaypointString.WithSameWidth(roadInformationBoardView), nextWaypointString.WithRelativeHeight(roadInformationBoardView, 0.2f), geoLabelData.Below(nextWaypointString), geoLabelData.AtLeftOf(roadInformationBoardView, 10), geoLabelData.WithSameWidth(roadInformationBoardView), geoLabelData.WithRelativeHeight(roadInformationBoardView, 0.2f), tollRoadString.Below(geoLabelData), tollRoadString.AtLeftOf(roadInformationBoardView, 10), tollRoadString.WithSameWidth(roadInformationBoardView), tollRoadString.WithRelativeHeight(roadInformationBoardView, 0.2f), statusLabel.Below(tollRoadString), statusLabel.AtLeftOf(roadInformationBoardView, 10), statusLabel.WithSameWidth(roadInformationBoardView), statusLabel.WithRelativeHeight(roadInformationBoardView, 0.2f) ); boardScrollView.AddSubviews(buttonContainerView, roadInformationBoardView); boardScrollView.Scrolled += (sender, e) => { Debug.WriteLine(((UIScrollView)sender).ContentOffset.X); }; // Slider container var applicationBoard = new UIImageView(UIImage.FromBundle(@"Images/HomeView/home_board.png")); applicationBoard.Frame = new CGRect(10, 10, applicationBoard.Image.CGImage.Width, applicationBoard.Image.CGImage.Height); boardContainerView = new UIView(); boardContainerView.AddIfNotNull(applicationBoard, boardScrollView); boardContainerView.AddConstraints( applicationBoard.WithSameHeight(boardContainerView), applicationBoard.WithSameWidth(boardContainerView), applicationBoard.WithSameCenterX(boardContainerView), applicationBoard.WithSameCenterY(boardContainerView), boardScrollView.AtTopOf(boardContainerView, 10), boardScrollView.AtLeftOf(boardContainerView, 25), boardScrollView.AtRightOf(boardContainerView, 25), boardScrollView.WithRelativeHeight(boardContainerView, 0.55f) ); // Bottom View trackingButton = RoundedButtonManager.ButtonInitiaziler(EnvironmentInfo.GetTrackingButtonDistanceBetweenTextAndImage); this.AddLinqBinding(ViewModel, vm => vm.TrackingCommand, (value) => { trackingButton.BackgroundColor = UIColor.White; trackingButton.Alpha = 0.7f; trackingButton.ButtonTextColor = UIColor.FromRGB(3, 117, 27); }); //var callCenterLabel = new UILabel(); //_callCentergButton = ButtonInitiaziler(null, UIImage.FromFile(@"Images/ic_home_support.png")); //_callCentergButton.ButtonText.TextColor = UIColor.LightGray; //_callCentergButton.ButtonBackgroundColor = null; //callCenterLabel.Text = "+(1)305 335 85 08"; //callCenterLabel.TextColor = UIColor.LightGray; var bottomView = new UIView(); bottomView.AddIfNotNull(trackingButton); bottomView.AddConstraints( trackingButton.AtTopOf(bottomView), trackingButton.AtLeftOf(bottomView, 20), trackingButton.AtRightOf(bottomView, 20), trackingButton.WithRelativeHeight(bottomView, EnvironmentInfo.GetTrackingButtonHeight), trackingButton.WithRelativeWidth(bottomView, EnvironmentInfo.GetTrackingButtonWidth) ); // View Initialising View.AddIfNotNull(topView, boardContainerView, bottomView); View.AddConstraints( topView.AtTopOf(View), topView.AtLeftOf(View), topView.AtRightOf(View), topView.WithRelativeHeight(View, 0.2f), boardContainerView.Below(topView), boardContainerView.AtLeftOf(View, 15), boardContainerView.AtRightOf(View, 15), boardContainerView.WithRelativeHeight(View, 0.43f), bottomView.Below(boardContainerView), bottomView.WithSameCenterX(topView), bottomView.WithRelativeHeight(View, 0.27f), bottomView.AtBottomOf(View, 30) ); }
/// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmLogin)); this.Label1 = new System.Windows.Forms.Label(); this.Label2 = new System.Windows.Forms.Label(); this.btnSetDB = new System.Windows.Forms.Button(); this.buttonId = new CCWin.SkinControl.SkinButton(); this.panelHeadImage = new CCWin.SkinControl.SkinPanel(); this.menuStripId = new CCWin.SkinControl.SkinContextMenuStrip(); this.textBoxPwd = new CCWin.SkinControl.SkinTextBox(); this.topLogo2 = new RMS.UserControls.topLogo(); this.txtLoginName = new RMS.UserControls.WaterMarkTextBox(); this.roundedButton2 = new RMS.UserControls.RoundedButton(); this.roundedButton1 = new RMS.UserControls.RoundedButton(); this.textBoxPwd.SuspendLayout(); this.SuspendLayout(); // // Label1 // this.Label1.AutoSize = true; this.Label1.BackColor = System.Drawing.Color.Transparent; this.Label1.Font = new System.Drawing.Font("Verdana", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label1.Location = new System.Drawing.Point(197, 171); this.Label1.Name = "Label1"; this.Label1.Size = new System.Drawing.Size(78, 17); this.Label1.TabIndex = 2; this.Label1.Text = "用户名[&N]:"; this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // Label2 // this.Label2.AutoSize = true; this.Label2.BackColor = System.Drawing.Color.Transparent; this.Label2.Font = new System.Drawing.Font("Verdana", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label2.Location = new System.Drawing.Point(197, 222); this.Label2.Name = "Label2"; this.Label2.Size = new System.Drawing.Size(77, 17); this.Label2.TabIndex = 4; this.Label2.Text = "密 码[&P]:"; this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // btnSetDB // this.btnSetDB.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnSetDB.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnSetDB.Location = new System.Drawing.Point(241, 383); this.btnSetDB.Name = "btnSetDB"; this.btnSetDB.Size = new System.Drawing.Size(124, 28); this.btnSetDB.TabIndex = 8; this.btnSetDB.Text = "数据源设置[&S]..."; this.btnSetDB.Visible = false; this.btnSetDB.Click += new System.EventHandler(this.btnSetDB_Click); // // buttonId // this.buttonId.BackColor = System.Drawing.Color.White; this.buttonId.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.buttonId.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.buttonId.ControlState = CCWin.SkinClass.ControlState.Normal; this.buttonId.Cursor = System.Windows.Forms.Cursors.Default; this.buttonId.DownBack = ((System.Drawing.Image)(resources.GetObject("buttonId.DownBack"))); this.buttonId.DrawType = CCWin.SkinControl.DrawStyle.Img; this.buttonId.Location = new System.Drawing.Point(437, 169); this.buttonId.Margin = new System.Windows.Forms.Padding(0); this.buttonId.MouseBack = ((System.Drawing.Image)(resources.GetObject("buttonId.MouseBack"))); this.buttonId.Name = "buttonId"; this.buttonId.NormlBack = ((System.Drawing.Image)(resources.GetObject("buttonId.NormlBack"))); this.buttonId.Size = new System.Drawing.Size(22, 24); this.buttonId.TabIndex = 35; this.buttonId.UseVisualStyleBackColor = false; this.buttonId.MouseDown += new System.Windows.Forms.MouseEventHandler(this.buttonId_MouseDown); // // panelHeadImage // this.panelHeadImage.BackColor = System.Drawing.Color.Transparent; this.panelHeadImage.BackgroundImage = global::RMS.WinForms.Properties.Resources.girl; this.panelHeadImage.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.panelHeadImage.ControlState = CCWin.SkinClass.ControlState.Normal; this.panelHeadImage.DownBack = null; this.panelHeadImage.Location = new System.Drawing.Point(75, 164); this.panelHeadImage.Margin = new System.Windows.Forms.Padding(0); this.panelHeadImage.MouseBack = null; this.panelHeadImage.Name = "panelHeadImage"; this.panelHeadImage.NormlBack = null; this.panelHeadImage.Radius = 4; this.panelHeadImage.Size = new System.Drawing.Size(85, 85); this.panelHeadImage.TabIndex = 36; // // menuStripId // this.menuStripId.Arrow = System.Drawing.Color.Black; this.menuStripId.AutoSize = false; this.menuStripId.Back = System.Drawing.Color.White; this.menuStripId.BackColor = System.Drawing.Color.White; this.menuStripId.BackRadius = 4; this.menuStripId.Base = System.Drawing.Color.FromArgb(((int)(((byte)(105)))), ((int)(((byte)(200)))), ((int)(((byte)(254))))); this.menuStripId.DropDownImageSeparator = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(147)))), ((int)(((byte)(209))))); this.menuStripId.Fore = System.Drawing.Color.Black; this.menuStripId.HoverFore = System.Drawing.Color.White; this.menuStripId.ImageScalingSize = new System.Drawing.Size(40, 40); this.menuStripId.ItemAnamorphosis = false; this.menuStripId.ItemBorder = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212))))); this.menuStripId.ItemBorderShow = false; this.menuStripId.ItemHover = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212))))); this.menuStripId.ItemPressed = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(148)))), ((int)(((byte)(212))))); this.menuStripId.ItemRadius = 4; this.menuStripId.ItemRadiusStyle = CCWin.SkinClass.RoundStyle.None; this.menuStripId.ItemSplitter = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(197)))), ((int)(((byte)(197))))); this.menuStripId.Name = "MenuId"; this.menuStripId.RadiusStyle = CCWin.SkinClass.RoundStyle.None; this.menuStripId.Size = new System.Drawing.Size(183, 4); this.menuStripId.TitleAnamorphosis = false; this.menuStripId.TitleColor = System.Drawing.Color.White; this.menuStripId.TitleRadius = 4; this.menuStripId.TitleRadiusStyle = CCWin.SkinClass.RoundStyle.None; this.menuStripId.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.menuStripId_Closing); // // textBoxPwd // this.textBoxPwd.BackColor = System.Drawing.Color.Transparent; this.textBoxPwd.BackgroundImage = global::RMS.WinForms.Properties.Resources.bg; this.textBoxPwd.Font = new System.Drawing.Font("微软雅黑", 9.75F); this.textBoxPwd.Icon = ((System.Drawing.Image)(resources.GetObject("textBoxPwd.Icon"))); this.textBoxPwd.IconIsButton = true; this.textBoxPwd.IconMouseState = CCWin.SkinClass.ControlState.Normal; this.textBoxPwd.Location = new System.Drawing.Point(277, 221); this.textBoxPwd.Margin = new System.Windows.Forms.Padding(0); this.textBoxPwd.MinimumSize = new System.Drawing.Size(0, 28); this.textBoxPwd.MouseBack = null; this.textBoxPwd.MouseState = CCWin.SkinClass.ControlState.Normal; this.textBoxPwd.Name = "textBoxPwd"; this.textBoxPwd.NormlBack = null; this.textBoxPwd.Padding = new System.Windows.Forms.Padding(5, 5, 120, 5); this.textBoxPwd.Size = new System.Drawing.Size(182, 28); // // textBoxPwd.BaseText // this.textBoxPwd.SkinTxt.BorderStyle = System.Windows.Forms.BorderStyle.None; this.textBoxPwd.SkinTxt.Dock = System.Windows.Forms.DockStyle.Fill; this.textBoxPwd.SkinTxt.Font = new System.Drawing.Font("微软雅黑", 9.75F); this.textBoxPwd.SkinTxt.Location = new System.Drawing.Point(5, 5); this.textBoxPwd.SkinTxt.Name = "BaseText"; this.textBoxPwd.SkinTxt.PasswordChar = '*'; this.textBoxPwd.SkinTxt.Size = new System.Drawing.Size(57, 18); this.textBoxPwd.SkinTxt.TabIndex = 0; this.textBoxPwd.SkinTxt.WaterColor = System.Drawing.Color.FromArgb(((int)(((byte)(127)))), ((int)(((byte)(127)))), ((int)(((byte)(127))))); this.textBoxPwd.SkinTxt.WaterText = "密码"; this.textBoxPwd.TabIndex = 37; this.textBoxPwd.IconClick += new System.EventHandler(this.textBoxPwd_IconClick); // // topLogo2 // this.topLogo2.Dock = System.Windows.Forms.DockStyle.Top; this.topLogo2.Font = new System.Drawing.Font("Verdana", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.topLogo2.gradientColor1 = System.Drawing.Color.FromArgb(((int)(((byte)(59)))), ((int)(((byte)(109)))), ((int)(((byte)(158))))); this.topLogo2.gradientColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(129)))), ((int)(((byte)(179)))), ((int)(((byte)(228))))); this.topLogo2.Location = new System.Drawing.Point(0, 0); this.topLogo2.Name = "topLogo2"; this.topLogo2.Size = new System.Drawing.Size(613, 55); this.topLogo2.TabIndex = 40; this.topLogo2.TabStop = false; this.topLogo2.Text = "topLogo2"; // // txtLoginName // this.txtLoginName.ForeColor = System.Drawing.Color.LightGray; this.txtLoginName.IsShowWaterText = true; this.txtLoginName.Location = new System.Drawing.Point(277, 168); this.txtLoginName.MarkText = "用户名"; this.txtLoginName.Name = "txtLoginName"; this.txtLoginName.ParentControl = null; this.txtLoginName.Size = new System.Drawing.Size(160, 25); this.txtLoginName.StartSearch = false; this.txtLoginName.TabIndex = 39; this.txtLoginName.Text = "用户名"; // // roundedButton2 // this.roundedButton2.BackColor = System.Drawing.Color.CornflowerBlue; this.roundedButton2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); this.roundedButton2.FlatAppearance.BorderSize = 0; this.roundedButton2.ForeColor = System.Drawing.SystemColors.ControlLightLight; this.roundedButton2.Location = new System.Drawing.Point(329, 326); this.roundedButton2.MouseDownBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); this.roundedButton2.MouseOverBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(165)))), ((int)(((byte)(0))))); this.roundedButton2.Name = "roundedButton2"; this.roundedButton2.Size = new System.Drawing.Size(103, 35); this.roundedButton2.TabIndex = 38; this.roundedButton2.Text = "退 出"; this.roundedButton2.UseVisualStyleBackColor = false; this.roundedButton2.Click += new System.EventHandler(this.roundedButton2_Click); // // roundedButton1 // this.roundedButton1.BackColor = System.Drawing.Color.CornflowerBlue; this.roundedButton1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192))))); this.roundedButton1.FlatAppearance.BorderSize = 0; this.roundedButton1.ForeColor = System.Drawing.SystemColors.ControlLightLight; this.roundedButton1.Location = new System.Drawing.Point(166, 326); this.roundedButton1.MouseDownBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); this.roundedButton1.MouseOverBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(165)))), ((int)(((byte)(0))))); this.roundedButton1.Name = "roundedButton1"; this.roundedButton1.Size = new System.Drawing.Size(103, 35); this.roundedButton1.TabIndex = 10; this.roundedButton1.Text = "登 录"; this.roundedButton1.UseVisualStyleBackColor = false; this.roundedButton1.Click += new System.EventHandler(this.roundedButton1_Click); // // frmLogin // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 17F); this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.ClientSize = new System.Drawing.Size(613, 432); this.Controls.Add(this.topLogo2); this.Controls.Add(this.txtLoginName); this.Controls.Add(this.roundedButton2); this.Controls.Add(this.textBoxPwd); this.Controls.Add(this.panelHeadImage); this.Controls.Add(this.buttonId); this.Controls.Add(this.roundedButton1); this.Controls.Add(this.Label1); this.Controls.Add(this.Label2); this.Controls.Add(this.btnSetDB); this.Font = new System.Drawing.Font("Verdana", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "frmLogin"; this.Text = "用户登录"; this.Load += new System.EventHandler(this.loginForm_Load); this.Controls.SetChildIndex(this.btnSetDB, 0); this.Controls.SetChildIndex(this.Label2, 0); this.Controls.SetChildIndex(this.Label1, 0); this.Controls.SetChildIndex(this.roundedButton1, 0); this.Controls.SetChildIndex(this.buttonId, 0); this.Controls.SetChildIndex(this.panelHeadImage, 0); this.Controls.SetChildIndex(this.textBoxPwd, 0); this.Controls.SetChildIndex(this.roundedButton2, 0); this.Controls.SetChildIndex(this.txtLoginName, 0); this.Controls.SetChildIndex(this.topLogo2, 0); this.textBoxPwd.ResumeLayout(false); this.textBoxPwd.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
private void drawButtons() { UIColor foregroundColorArray = UIColor.FromRGB(30, 30, 30); RoundedButtonStyle buttonStyleArray = RoundedButtonStyle.Default; CGRect backgroundRect = new CGRect ( (_backgroundViewWidth / 2) - 130, _backgroundViewHeight - 400, //(_backgroundViewHeight / 2) + 100, 400, 400 ); backgroundViewConfirm = new HollowBackgroundView (backgroundRect); backgroundViewConfirm.ForegroundColor = foregroundColorArray; backgroundViewConfirm.Hidden = true; View.AddSubview (backgroundViewConfirm); CGRect tokenRect = new CGRect ( 0, 0, 100, 100 ); RoundedButton confirmButton = new RoundedButton ( tokenRect, RoundedButtonStyle.Default, "3" ); confirmButton.BackgroundColor = UIColor.FromRGB(84, 164, 224); confirmButton.TextLabel.Text = "OK"; confirmButton.TextLabel.Font = UIFont.FromName ("Arial", 35F); confirmButton.TouchUpInside += confirmClicked; confirmLabel = new UILabel { Text = "Confirm score", BackgroundColor = UIColor.Clear, TextColor = UIColor.White, Font = UIFont.FromName ("Arial", 30f), Frame = new CGRect(120, 25, 300, labelh), }; backgroundViewConfirm.AddSubview (confirmButton); backgroundViewConfirm.AddSubview (confirmLabel); backgroundViewToken = new HollowBackgroundView (backgroundRect); backgroundViewToken.ForegroundColor = foregroundColorArray; backgroundViewToken.Hidden = true; View.AddSubview (backgroundViewToken); tokenRect = new CGRect ( 0, 0, 100, 100 ); RoundedButton chipButton = new RoundedButton ( tokenRect, RoundedButtonStyle.CentralImage, "4" ); chipButton.BackgroundColor = UIColor.Clear; chipButton.ImageView.Image = UIImage.FromBundle ("chip.png"); chipButton.TouchUpInside += chipClicked; tokenLabel = new UILabel { Text = "Token required!", BackgroundColor = UIColor.Clear, TextColor = UIColor.FromRGB(204, 0, 102), Font = UIFont.FromName ("Arial", 30f), Frame = new CGRect(120, 25, 300, labelh), }; backgroundViewToken.AddSubview (chipButton); backgroundViewToken.AddSubview (tokenLabel); backgroundViewKeyPad = new HollowBackgroundView (backgroundRect); backgroundViewKeyPad.ForegroundColor = foregroundColorArray; View.AddSubview (backgroundViewKeyPad); nfloat buttonSize = 70F; CGRect buttonRect = new CGRect ( 0, 0, buttonSize, buttonSize ); for (var i = 0; i < 12; i++) { var style = (i == 9 ? "2" : (i == 11 ? "3" : "1")); var color = (i == 11 ? UIColor.FromRGB(30, 30, 30) : UIColor.FromRGB(84, 164, 224)); RoundedButton button = new RoundedButton ( buttonRect, buttonStyleArray, style ); button.TouchUpInside += buttonClicked; button.BackgroundColor = color; var label = string.Empty; switch (i) { case 9: label = "X"; break; case 10: label = "0"; break; case 11: label = "↵"; break; default: label = (i + 1).ToString (); break; } button.TextLabel.Text = label; button.TextLabel.Font = UIFont.FromName ("Arial", 35F); backgroundViewKeyPad.AddSubview (button); if (i == 2 || i == 5 || i == 8) { buttonRect.Y += 80; buttonRect.X = 0; } else { buttonRect.X += buttonSize + 25; } } }
public static RoundedButton ButtonInitiaziler(nfloat _distanceBetweenTextAndImage) { _roundedButton = new RoundedButton(_distanceBetweenTextAndImage); return(SetParameters()); }
private void textBoxTags_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Return) { string[] tags = this.textBoxTags.Text.Split(' '); //Add tags to note for (int i = 0; i < flpNote.Controls.Count; i++) { if (flpNote.Controls[i].BackColor == Color.LightGray) { if (NoteController.GetNote(i) is null) { MessageBox.Show("The selected note doesn't have a description. Please enter a description before adding tags", "", MessageBoxButtons.OK, MessageBoxIcon.Information); this.textBoxTags.Text = ""; return; } Note note = NoteController.GetNote(i); if (string.IsNullOrEmpty(note.tags)) { note.tags = ""; } foreach (var tag in tags) { if (!note.tags.Contains(tag)) { note.tags += tag + " "; } } NoteController.UpdateNote(note); } } foreach (var tag in tags) { if (tag == "") { continue; } bool isContinue = false; foreach (Control control in this.flpTags.Controls) { if (control.GetType() == typeof(RoundedButton) && control.Text == tag) { isContinue = true; } } if (isContinue) { this.textBoxTags.Text = ""; continue; } //Add tags to view RoundedButton btn = new RoundedButton(); btn.Width = 5; btn.AutoSize = true; btn.Text = tag; btn.FlatStyle = FlatStyle.Flat; btn.FlatAppearance.BorderSize = 0; btn.TextAlign = ContentAlignment.MiddleCenter; btn.Font = new Font("Open Sans", 9, FontStyle.Regular); btn.Margin = new Padding(5, 5, 5, 5); btn.Anchor = AnchorStyles.None; btn.BackColor = Color.LightGray; btn.Click += Btn_Click1; int index = this.flpTags.Controls.IndexOf(textBoxTags) > 0 ? this.flpTags.Controls.IndexOf(textBoxTags) : 0; this.flpTags.SuspendLayout(); this.flpTags.Controls.Add(btn); this.flpTags.Controls.SetChildIndex(btn, index > 0 ? index : 0); this.flpTags.ResumeLayout(); this.textBoxTags.Text = ""; this.textBoxTags.Focus(); } } }
private void Btn_Click(object sender, EventArgs e) { Button btn = sender as Button; for (int i = 0; i < this.flpNote.Controls.Count; i++) { flpNote.Controls[i].BackColor = Color.White; } for (int i = this.flpTags.Controls.Count - 1; i >= 0; i--) { Control c = this.flpTags.Controls[i]; if (c.GetType() != typeof(TextBox)) { this.flpTags.Controls.RemoveAt(i); } } btn.BackColor = Color.LightGray; for (int i = 0; i < flpNote.Controls.Count; i++) { if (flpNote.Controls[i].BackColor == Color.LightGray) { this.richTextBoxDescription.Text = NoteController.GetNote(i).description; Note note = NoteController.GetNote(i); if (string.IsNullOrEmpty(note.tags)) { note.tags = ""; break; } string[] tags = note.tags.Split(' '); foreach (var tag in tags) { if (string.IsNullOrWhiteSpace(tag)) { continue; } bool isContinue = false; foreach (Control control in this.flpTags.Controls) { if (control.GetType() == typeof(RoundedButton) && control.Text == tag) { isContinue = true; } } if (isContinue) { this.textBoxTags.Text = ""; continue; } RoundedButton rbtn = new RoundedButton(); rbtn.Width = 5; rbtn.AutoSize = true; rbtn.Text = tag; rbtn.FlatStyle = FlatStyle.Flat; rbtn.FlatAppearance.BorderSize = 0; rbtn.TextAlign = ContentAlignment.MiddleCenter; rbtn.Font = new Font("Open Sans", 9, FontStyle.Regular); rbtn.Margin = new Padding(5, 5, 5, 5); rbtn.Anchor = AnchorStyles.None; rbtn.BackColor = Color.LightGray; rbtn.Click += Btn_Click1; int index = this.flpTags.Controls.IndexOf(this.textBoxTags) > 0 ? this.flpTags.Controls.IndexOf(this.textBoxTags) : 0; this.flpTags.SuspendLayout(); this.flpTags.Controls.Add(rbtn); this.flpTags.Controls.SetChildIndex(rbtn, index > 0 ? index : 0); this.flpTags.ResumeLayout(); } break; } } }
public static RoundedButton ButtonInitiaziler(string text = null, UIImage image = null, UIImage pointer = null, UIColor textColor = null, UIColor backgroundColor = null, int linesNumber = 0) { _roundedButton = new RoundedButton(); return(SetParameters(text, image, pointer, textColor, backgroundColor, linesNumber)); }
void ConfigureScreen() { //var navBar = ConfigureNavBar("Adicionar carro", true, true); var navBar = new StackLayout(); SearchEntry = new RoundedBorderedEntry() { CenteredPlaceholder = true, PlaceholderColor = ColorPalette.DarkBlue, Placeholder = "Qual o tipo do seu carro?".ToUpper(), FontAttributes = FontAttributes.Bold, FontSize = 15, TextColor = ColorPalette.DarkBlue, Padding = new Thickness(50, 30), BorderColor = ColorPalette.DarkBlue, BorderWidth = App.ScreenWidth / 72, HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.CenterAndExpand }; this.SearchEntry.SizeChanged += OnSearchSizeChanged; SearchIcon = new Icon() { Color = ColorPalette.DarkBlue, FileName = "search.svg", HeightRequest = 25, WidthRequest = 25, VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.StartAndExpand, Margin = new Thickness(15, 0, 0, 0) }; SearchIcon.SetBinding(VisualElement.IsVisibleProperty, new Binding(nameof(SearchEntry.Text), source: SearchEntry, converter: new ValueConverter((text) => string.IsNullOrWhiteSpace((string)text)))); SearchGrid = new Grid() { HorizontalOptions = LayoutOptions.FillAndExpand, Margin = new Thickness(20, 30, 20, 30), }; SearchGrid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(50, GridUnitType.Absolute) }); SearchGrid.ColumnDefinitions.Add(new ColumnDefinition()); SearchGrid.Children.Add(SearchEntry, 0, 0); SearchGrid.Children.Add(SearchIcon, 0, 0); Label textSubtitleLabel = new Label() { Text = "Tipos populares", FontSize = 14, TextColor = ColorPalette.Gray, Margin = new Thickness(20, 0, 0, 0), HorizontalOptions = LayoutOptions.FillAndExpand }; RoundedBorderedLabel subtitleLabel = new RoundedBorderedLabel(textSubtitleLabel, Color.Transparent, 0, ColorPalette.ExtraLightGray, new Thickness(0, 5), 0) { HorizontalOptions = LayoutOptions.FillAndExpand }; subtitleLabel.Content.HorizontalOptions = subtitleLabel.HorizontalOptions; CarSelectionList optionsList = new CarSelectionList() { ItemsSource = ViewModel.TypeOptions, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, }; optionsList.SetBinding(ListView.SelectedItemProperty, new Binding(nameof(ViewModel.SelectedType))); RoundedButton confirmatioButton = new RoundedButton() { BackgroundColor = ColorPalette.LightBlue, TextColor = Color.White, FontAttributes = FontAttributes.Bold, Text = "Continuar".ToUpper(), Margin = new Thickness(50, 0, 50, 30), FontSize = 17, VerticalOptions = LayoutOptions.End, Padding = new Thickness(10), Command = ViewModel.SelectOption }; Content = new StackLayout() { Children = { navBar, SearchGrid, SearchEntry, subtitleLabel, optionsList, confirmatioButton } }; }
private void ConfigureScreen() { BackgroundColor = Color.White; var navBar = BaseContentPage.Instance.ConfigureNavBar("", false, true); var Title = "Conseguimos!!!"; var Description = "Baliza finalizada com sucesso"; var Img = "heart.svg"; if (StepViewModel.curbColisionTrue == true) { Img = "x.svg"; Title = "Eita, não cabe!"; Description = "Teremos que procurar outra vaga"; } var centeredStack = new StackLayout() { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.CenterAndExpand, Margin = 10, Children = { new Icon() { FileName = Img, WidthRequest = App.ScreenWidth / 2.5 / 1.5, HeightRequest = App.ScreenWidth / 2.5 / 1.5, Margin = new Thickness(20), HorizontalOptions = LayoutOptions.CenterAndExpand, Color = ColorPalette.Pink }, new Label() { Text = Title.ToUpper(), TextColor = Color.Black, FontAttributes = FontAttributes.Bold, FontSize = 21, HorizontalTextAlignment = TextAlignment.Center, }, new Label() { TextColor = ColorPalette.LightBlue, Text = Description, FontSize = 19, FontAttributes = FontAttributes.Bold, HorizontalTextAlignment = TextAlignment.Center, } } }; RoundedButton finalizeButton = new RoundedButton() { Text = "Finalizar".ToUpper(), BackgroundColor = ColorPalette.Pink, TextColor = Color.White, FontAttributes = FontAttributes.Bold, VerticalOptions = LayoutOptions.End, Margin = 30, Command = ViewModel.CloseApp, }; RoundedButton returnintoButton = new RoundedButton() { Text = "Voltar para inicio".ToUpper(), BackgroundColor = ColorPalette.Pink, TextColor = Color.White, FontAttributes = FontAttributes.Bold, VerticalOptions = LayoutOptions.End, Margin = 30, Command = ViewModel.Continue, }; Children.Add(navBar); Children.Add(centeredStack); Children.Add(finalizeButton); Children.Add(returnintoButton); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.lblCurrentOp = new System.Windows.Forms.Label(); this.lblOp = new System.Windows.Forms.Label(); this.lblProgrress = new System.Windows.Forms.Label(); this.lblProg = new System.Windows.Forms.Label(); this.btnCancel = new Avat.Components.RoundedButton(); this.progressBar = new Avat.Components.MyProgress(); this.SuspendLayout(); // // lblCurrentOp // this.lblCurrentOp.Anchor = System.Windows.Forms.AnchorStyles.None; this.lblCurrentOp.AutoSize = true; this.lblCurrentOp.ForeColor = System.Drawing.Color.Gray; this.lblCurrentOp.Location = new System.Drawing.Point(12, 14); this.lblCurrentOp.Name = "lblCurrentOp"; this.lblCurrentOp.Size = new System.Drawing.Size(99, 13); this.lblCurrentOp.TabIndex = 1; this.lblCurrentOp.Text = "Aktuálna operácia: "; // // lblOp // this.lblOp.Anchor = System.Windows.Forms.AnchorStyles.None; this.lblOp.AutoSize = true; this.lblOp.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblOp.ForeColor = System.Drawing.Color.Gray; this.lblOp.Location = new System.Drawing.Point(117, 14); this.lblOp.Name = "lblOp"; this.lblOp.Size = new System.Drawing.Size(44, 13); this.lblOp.TabIndex = 2; this.lblOp.Text = "žiadna"; // // lblProgrress // this.lblProgrress.Anchor = System.Windows.Forms.AnchorStyles.None; this.lblProgrress.AutoSize = true; this.lblProgrress.ForeColor = System.Drawing.Color.Gray; this.lblProgrress.Location = new System.Drawing.Point(12, 59); this.lblProgrress.Name = "lblProgrress"; this.lblProgrress.Size = new System.Drawing.Size(49, 13); this.lblProgrress.TabIndex = 3; this.lblProgrress.Text = "Priebeh: "; // // lblProg // this.lblProg.Anchor = System.Windows.Forms.AnchorStyles.None; this.lblProg.AutoSize = true; this.lblProg.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblProg.ForeColor = System.Drawing.Color.Gray; this.lblProg.Location = new System.Drawing.Point(117, 59); this.lblProg.Name = "lblProg"; this.lblProg.Size = new System.Drawing.Size(44, 13); this.lblProg.TabIndex = 4; this.lblProg.Text = "žiadna"; // // btnCancel // this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.None; this.btnCancel.FlatAppearance.BorderColor = System.Drawing.Color.Gray; this.btnCancel.FlatAppearance.MouseDownBackColor = System.Drawing.Color.WhiteSmoke; this.btnCancel.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Gainsboro; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnCancel.ForeColor = System.Drawing.Color.Gray; this.btnCancel.Location = new System.Drawing.Point(401, 73); this.btnCancel.Margin = new System.Windows.Forms.Padding(0); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(100, 26); this.btnCancel.TabIndex = 5; this.btnCancel.TabStop = false; this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = false; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // progressBar // this.progressBar.Anchor = System.Windows.Forms.AnchorStyles.None; this.progressBar.Location = new System.Drawing.Point(15, 30); this.progressBar.Name = "progressBar"; this.progressBar.Size = new System.Drawing.Size(486, 26); this.progressBar.Style = System.Windows.Forms.ProgressBarStyle.Continuous; this.progressBar.TabIndex = 0; // // Progress // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.ClientSize = new System.Drawing.Size(518, 139); this.ControlBox = false; this.Controls.Add(this.btnCancel); this.Controls.Add(this.lblProg); this.Controls.Add(this.lblProgrress); this.Controls.Add(this.lblOp); this.Controls.Add(this.lblCurrentOp); this.Controls.Add(this.progressBar); this.DoubleBuffered = true; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MinimumSize = new System.Drawing.Size(526, 147); this.Name = "Progress"; this.ShowIcon = false; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Priebeh"; this.ResumeLayout(false); this.PerformLayout(); }