Example #1
0
        public Form1()
        {
            InitializeComponent();
            try
            {
                System.Drawing.Icon ico = new System.Drawing.Icon(GetIconFile(@"common\Images\Grid\Icon\sficon.ico"));
                this.Icon = ico;
            }
            catch { }

            data = new OrderInfoCollection();
            sfDataGrid1.DataSource = data.OrdersListDetails;
            GridSettings();

            #region TitleBarControl Customizations
            this.Style.TitleBar.Height = 38;
            this.CenterToScreen();
            this.MinimumSize              = this.Size;
            panel                         = new FlowLayoutPanel();
            panel.Size                    = new System.Drawing.Size(1061, 24);
            titleLabel                    = new Label();
            titleLabel.Location           = new Point(3, 3);
            titleLabel.Size               = new Size(470, 25);
            titleLabel.Font               = new Font("Segeo UI", 13, FontStyle.Regular);
            titleLabel.Text               = "Searching";
            titleLabel.ForeColor          = Color.FromArgb(78, 77, 77);
            searchBox                     = new TextBoxExt();
            searchBox.Text                = "Quick Search";
            searchBox.ForeColor           = SystemColors.GrayText;
            searchBox.Leave              += SearchBox_Leave;
            searchBox.Enter              += SearchBox_Enter;
            searchBox.Size                = new System.Drawing.Size(276, 26);
            searchBox.BorderStyle         = BorderStyle.FixedSingle;
            searchBox.BorderColor         = ColorTranslator.FromHtml("#0AA2E6");
            searchBox.KeyUp              += SearchBox_KeyUp;
            searchBox.Anchor              = AnchorStyles.Right;
            this.Style.TitleBar.BackColor = Color.White;
            button                        = new SfButton();
            button.Size                   = new System.Drawing.Size(30, 21);
#if NETCORE
            button.Image = Image.FromFile("../../../Images/search.png");
#else
            button.Image = Image.FromFile("../../Images/search.png");
#endif
            button.BackColor = Color.White;
            button.Style.FocusedBackColor = Color.White;
            button.Style.HoverBackColor   = Color.White;
            button.Style.PressedBackColor = Color.White;
            button.Style.FocusedBorder    = Pens.White;
            button.Style.Border           = Pens.White;
            button.Style.PressedBorder    = Pens.White;
            button.Style.HoverBorder      = Pens.White;
            button.Width = 29;
            panel.Controls.Add(titleLabel);
            panel.Controls.Add(button);
            panel.Controls.Add(searchBox);
            this.TitleBarTextControl = panel;
            titleLabel.MouseDown    += TitleLabel_MouseDown;
            #endregion
        }
Example #2
0
        /// <summary>
        /// Opens the photo picker for the user to upload an image.
        /// </summary>
        private async void OnPickPhotoButtonClicked(object sender, EventArgs e)
        {
            SfButton button = sender as SfButton;

            button.IsEnabled = false;

            var    picker = DependencyService.Get <IPhotoPickerService>();
            Stream stream = await picker?.GetImageStreamAsync();

            if (stream != null)
            {
                using (var memoryStream = new MemoryStream())
                {
                    await stream.CopyToAsync(memoryStream);

                    byte[] rawImage = memoryStream.ToArray();
                    string encoded  = Convert.ToBase64String(rawImage);

                    Image.Source = ImageSource.FromStream(() => new MemoryStream(rawImage));

                    await Navigation.PushModalAsync(new ProfileImageEditor(Image.Source));
                }
            }

            button.IsEnabled = true;
        }
Example #3
0
        private void YourButtonClick(object sender, EventArgs e)
        {
            SfButton button = sender as SfButton;

            Exercises.CurrentExercisesId = int.Parse(button.ClassId);
            Navigation.PushAsync(new CurrentExercise());
        }
Example #4
0
        /// <summary>
        /// Loads the operators.
        /// </summary>
        /// <param name="viewModel">The view model.</param>
        private void LoadOperators(MobileTopupSelectOperatorViewModel viewModel)
        {
            RowDefinitionCollection rowDefinitionCollection = new RowDefinitionCollection();

            for (Int32 i = 0; i < viewModel.Operators.Count; i++)
            {
                rowDefinitionCollection.Add(new RowDefinition
                {
                    Height = 80
                });
            }

            this.OperatorsGrid.RowDefinitions = rowDefinitionCollection;

            Int32 rowCount = 0;

            foreach (String viewModelOperator in viewModel.Operators)
            {
                SfButton button = new SfButton
                {
                    Text = viewModelOperator,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                    //HeightRequest = 100,
                    //WidthRequest = 400,
                    AutomationId     = viewModelOperator,
                    Command          = new Command <SelectedItemChangedEventArgs>(this.Execute),
                    CommandParameter = new SelectedItemChangedEventArgs(viewModelOperator, rowCount)
                };
                button.SetDynamicResource(VisualElement.StyleProperty, "SfButtonStyleMobileTopup");

                this.OperatorsGrid.Children.Add(button, 0, rowCount);
                rowCount++;
            }
        }
Example #5
0
        private void CategoryBtnClick(object sender, EventArgs e) //카테고리 버튼 클릭 이벤트
        {
            SfButton sfButton = (SfButton)sender;

            CurrentSelectedColor        = sfButton.BackColor;
            labelCurrentColor.BackColor = sfButton.BackColor;
        }
        /// <summary>
        /// This method is used for getting the marquee label content.
        /// </summary>
        /// <param name="content"></param>
        /// <param name="PriorityId"></param>
        /// <returns></returns>
        private SfButton GetNewButton(string content, int priorityId, string imageName)
        {
            var button = new SfButton()
            {
                FontSize          = 16,
                Text              = content,
                HeightRequest     = 45,
                HasShadow         = false,
                Margin            = new Thickness(0, 0, 8, 0),
                Padding           = new Thickness(12, 0, 18, 0),
                ImageSource       = imageName,
                ShowIcon          = true,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                TextColor         = (Color)Application.Current.Resources["ContentTextColor"],
                BackgroundColor   = GetPriorityColor(priorityId),
                VerticalOptions   = LayoutOptions.Center,
            };

            button.Clicked += (sender, args) =>
            {
                //Perform marquee selected item.
            };

            return(button);
        }
Example #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SimpleLoginPage" /> class.
        /// </summary>
        public SimpleLoginPage()
        {
            InitializeComponent();

            SfButton button = new SfButton();
            //button.Clicked += Button_Clicked;
        }
Example #8
0
        private void DeleteExerciseButton_Click(object sender, EventArgs e)
        {
            SfButton button = sender as SfButton;

            App.Database.DeleteItem(int.Parse(button.ClassId));
            App.UpdateMainTableList();
            Navigation.PushAsync(new ProfilePage());
        }
Example #9
0
        /// <summary>
        /// To show the popup layout.
        /// </summary>
        /// <param name="title"></param>
        /// <param name="content"></param>
        public void ShowPopUp(string title = null, string content = null, string buttonText = null, INavigation navigation = null, Type pageToNavigate = null)
        {
            DataTemplate templateView;
            Grid         layout;

            templateView = new DataTemplate(() =>
            {
                layout        = new Grid();
                layout.Margin = new Thickness(10, 0, 10, 0);
                layout.RowDefinitions.Add(new RowDefinition {
                    Height = GridLength.Star
                });
                layout.RowDefinitions.Add(new RowDefinition {
                    Height = GridLength.Auto
                });

                Label popupContent = new Label();
                popupContent.Text  = content;
                popupContent.HorizontalTextAlignment = TextAlignment.Center;
                popupContent.VerticalTextAlignment   = TextAlignment.Center;
                popupContent.VerticalOptions         = LayoutOptions.Center;
                var fontFamily = Device.RuntimePlatform == Device.iOS ? "Montserrat-SemiBold" :
                                 Device.RuntimePlatform == Device.Android ? "Montserrat-SemiBold.ttf#Montserrat-SemiBold" : "Assets/Montserrat-SemiBold.ttf#Montserrat-SemiBold";
                popupContent.FontFamily = fontFamily;
                layout.Children.Add(popupContent, 0, 0);

                if (buttonText != null)
                {
                    SfButton button        = new SfButton();
                    button.Text            = buttonText;
                    button.Margin          = new Thickness(20, 0, 20, 20);
                    button.VerticalOptions = LayoutOptions.End;
                    if (navigation != null && pageToNavigate != null)
                    {
                        button.CommandParameter = new List <object>()
                        {
                            navigation, pageToNavigate
                        };
                        button.Clicked += Button_Clicked;
                    }
                    layout.Children.Add(button, 0, 1);
                }
                return(layout);
            });

            this.PopupView.ShowHeader       = false;
            this.PopupView.ShowFooter       = false;
            this.PopupView.HeightRequest    = 130;
            this.PopupView.ShowCloseButton  = false;
            this.PopupView.AcceptButtonText = "OK";

            // Adding ContentTemplate of the SfPopupLayout
            this.PopupView.ContentTemplate = templateView;

            this.Show();
        }
Example #10
0
        protected override void OnAppearing()
        {
            try
            {
                pbDinheiro.Progress     = (float)MainPage.dinheiro;
                pbHumor.Progress        = (float)MainPage.humor;
                labelHumor.Text         = Resposta.RetornarEmoji();
                pbConhecimento.Progress = (float)MainPage.conhecimento;

                if (pergunta != null && !String.IsNullOrEmpty(pergunta.Explicacao))
                {
                    DisplayAlert("Para conhecimento!", pergunta.Explicacao, "Entendi");
                }

                pergunta = _repo.GetPergunta();

                lblPergunta.Text = pergunta.TextoPergunta;

                flAlternativas.Children.Clear();

                foreach (var alternativa in pergunta.Alternativas)
                {
                    SfButton botaoAlternativa = new SfButton
                    {
                        Text  = alternativa.Texto,
                        Style = (Style)Application.Current.Resources["alternativa"],
                        BackgroundGradient = new SfRadialGradientBrush
                        {
                            Radius        = 10,
                            GradientStops = new GradientStopCollection()
                            {
                                new SfGradientStop()
                                {
                                    Color = Color.FromHex("#70A288"), Offset = 0
                                },
                                new SfGradientStop()
                                {
                                    Color = Color.FromHex("#4B755F"), Offset = 1
                                }
                            }
                        }
                    };

                    botaoAlternativa.Clicked += (sender, args) => Navigation.PushAsync(new View.Resposta(alternativa), false);

                    flAlternativas.Children.Add(botaoAlternativa);
                }
            }
            catch (Exception ex)
            {
                Navigation.PushAsync(new View.Fim(), false);
            }
        }
Example #11
0
        /// <summary>
        /// Invoked when the suggestion button is clicked.
        /// </summary>
        /// <param name="obj">The Object</param>
        private void SuggestionClicked(object obj)
        {
            SfButton button = obj as SfButton;

            if (button.Text == "PAIR")
            {
                button.Text = "UNPAIR";
            }
            else if (button.Text == "UNPAIR")
            {
                button.Text = "PAIR";
            }
        }
Example #12
0
        /// <summary>
        /// Invoked when the Follow button is clicked.
        /// </summary>
        /// <param name="obj">The Object</param>
        private void FollowClicked(object obj)
        {
            SfButton button = obj as SfButton;

            if (button.Text == "FOLLOW")
            {
                button.Text = "FOLLOWED";
            }
            else if (button.Text == "FOLLOWED")
            {
                button.Text = "FOLLOW";
            }
        }
        /// <summary>
        /// To show the popup layout.
        /// </summary>
        /// <param name="content">The content</param>
        /// <param name="buttonText">The button text</param>
        public void ShowPopUp(string content = null, string buttonText = null)
        {
            DataTemplate templateView;
            Grid         layout;

            templateView = new DataTemplate(() =>
            {
                layout        = new Grid();
                layout.Margin = new Thickness(10, 0, 10, 0);
                layout.RowDefinitions.Add(new RowDefinition {
                    Height = GridLength.Star
                });
                layout.RowDefinitions.Add(new RowDefinition {
                    Height = GridLength.Auto
                });

                Label popupContent = new Label();
                popupContent.Text  = content;
                popupContent.HorizontalTextAlignment = TextAlignment.Center;
                popupContent.VerticalTextAlignment   = TextAlignment.Center;
                popupContent.VerticalOptions         = LayoutOptions.Center;
                var fontFamily          = "Montserrat-SemiBold";
                popupContent.FontFamily = fontFamily;
                layout.Children.Add(popupContent, 0, 0);

                if (buttonText != null)
                {
                    SfButton button        = new SfButton();
                    button.Text            = buttonText;
                    button.Margin          = new Thickness(20, 0, 20, 20);
                    button.VerticalOptions = LayoutOptions.End;
                    layout.Children.Add(button, 0, 1);
                }

                return(layout);
            });

            this.PopupView.ShowHeader       = false;
            this.PopupView.ShowFooter       = false;
            this.PopupView.HeightRequest    = 130;
            this.PopupView.ShowCloseButton  = false;
            this.PopupView.AcceptButtonText = "OK";

            // Adding ContentTemplate of the SfPopupLayout
            this.PopupView.ContentTemplate = templateView;

            this.Show();
        }
        /// <summary>
        /// You can override this method to subscribe to AssociatedObject events and initialize properties.
        /// </summary>
        /// <param name="bindAble">SampleView type parameter named as bindAble</param>
        protected override void OnAttachedTo(SampleView bindAble)
        {
            base.OnAttachedTo(bindAble);

            this.popupLayout = bindAble.FindByName <Syncfusion.XForms.PopupLayout.SfPopupLayout>("popupLayout");
            this.viewModel   = new GettingStartedViewModel();

            this.alertWithTitle          = bindAble.FindByName <SfButton>("AlertTitle");
            this.alertWithTitle.Clicked += this.AlertWithTitle_Clicked;

            this.contentBackGroundColor = Color.White;
            this.contentTextColor       = Color.Gray;
            this.headerTextColor        = Color.Black;

            bindAble.BindingContext = this.viewModel;
        }
        private async void cancelButton_Clicked(object sender, EventArgs e)
        {
            try
            {
                SfButton    button            = sender as SfButton;
                StackLayout listViewItem      = button.Parent as StackLayout;
                var         topicSuggestedDto = listViewItem.Parent.BindingContext as TopicSuggestedDto;
                await _topicsService.Delete <dynamic>(topicSuggestedDto.Id);

                await _model.Init();
            }
            catch (Exception ex)
            {
                await Application.Current.MainPage.DisplayAlert("Error", ex.Message, "OK");
            }
        }
        public HomeView(ViewModelBase bindingContext)
        {
            BindingContext = bindingContext;

            Title = "Home Page";
            IsBackLayerRevealed   = false;
            BackLayerRevealOption = RevealOption.Auto;

            var profile = new SfButton
            {
                Text            = "Profile",
                BackgroundColor = Color.Transparent,
                Command         = ((HomeViewModel)BindingContext).NavigateToProfileViewCommand
            };

            var reservations = new SfButton
            {
                Text            = "Reservations",
                BackgroundColor = Color.Transparent,
                Command         = ((HomeViewModel)BindingContext).NavigateToReservationsViewCommand
            };

            var logout = new SfButton
            {
                Text            = "Logout",
                BackgroundColor = Color.Transparent,
                Command         = ((HomeViewModel)BindingContext).LogoutCommand
            };

            var backLayer = new BackdropBackLayer
            {
                Content = new StackLayout
                {
                    Padding  = new Thickness(10, 10, 10, 10),
                    Children = { profile, reservations, logout }
                }
            };

            BackLayer = backLayer;

            var frontLayer = new BackdropFrontLayer
            {
                Content = ((HomeViewModel)BindingContext).FrontLayerContentPage.Content
            };

            FrontLayer = frontLayer;
        }
Example #17
0
        public LoginView(ViewModelBase bindingContext)
        {
            BindingContext = bindingContext;

            NavigationPage.SetHasNavigationBar(this, false);

            var title = new Label
            {
                Text              = "Login",
                FontSize          = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Margin            = new Thickness(0, 50)
            };

            var dataForm = new SfDataForm
            {
                LayoutOptions     = LayoutType.TextInputLayout,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                ValidationMode    = ValidationMode.PropertyChanged,
                DataObject        = ((LoginViewModel)BindingContext).LoginInformation
            };

            var login = new SfButton
            {
                Text            = "Login",
                BackgroundColor = (Color)Xamarin.Forms.Application.Current.Resources["primaryColor"],
                Command         = ((LoginViewModel)BindingContext).NavigateToResourceListPageCommand
            };

            var signup = new SfButton
            {
                Text            = "Signup",
                BackgroundColor = Color.Transparent,
                TextColor       = Color.Gray,
                Command         = ((LoginViewModel)BindingContext).NavigateToRegisterPageCommand
            };

            Content = new StackLayout
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                Padding           = 30,
                Spacing           = 10,
                Children          = { title, dataForm, login, signup }
            };
        }
Example #18
0
        public ProfileView(ViewModelBase bindingContext)
        {
            BindingContext = bindingContext;

            NavigationPage.SetHasNavigationBar(this, false);

            var title = new Label
            {
                Text              = "Profile",
                FontSize          = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
            };

            var dataForm = new SfDataForm
            {
                LayoutOptions     = LayoutType.TextInputLayout,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                ValidationMode    = ValidationMode.PropertyChanged,
                DataObject        = ((ProfileViewModel)BindingContext).ProfileInformation
            };

            var update = new SfButton
            {
                Text            = "Update",
                BackgroundColor = (Color)Xamarin.Forms.Application.Current.Resources["primaryColor"],
                Command         = ((ProfileViewModel)BindingContext).UpdateCommand
            };

            var back = new SfButton
            {
                Text            = "Back",
                BackgroundColor = Color.Transparent,
                TextColor       = Color.Gray,
                Command         = ((ProfileViewModel)BindingContext).NavigateBack
            };

            Content = new StackLayout
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                Padding           = 30,
                Spacing           = 10,
                Children          = { title, dataForm, update, back }
            };
        }
        private async void addButton_Clicked(object sender, EventArgs e)
        {
            try
            {
                SfButton    button       = sender as SfButton;
                StackLayout listViewItem = button.Parent as StackLayout;
                _clickedObject = listViewItem.Parent.BindingContext as TopicSuggestedDto;

                var addPostPage = new NavigationPage(new AddPostPage());
                addPostPage.Disappearing += AddPostPage_Disappearing;

                await Navigation.PushModalAsync(addPostPage);
            }
            catch (Exception ex)
            {
                await Application.Current.MainPage.DisplayAlert("Error", ex.Message, "OK");
            }
        }
Example #20
0
 /// <summary>
 /// Changes the state of the SfButton to enabled or disabled. If this checkbox is checked, then all the SfButtons
 /// are disabled, otherwise all the SfButtons are enabled.
 /// </summary>
 private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
     foreach (Control control in this.panel2.Controls)
     {
         if (control is SfButton)
         {
             SfButton sfbutton = control as SfButton;
             sfbutton.Enabled = !checkBox1.Checked;
         }
         else
         {
             foreach (Control button in control.Controls)
             {
                 if (button is SfButton)
                 {
                     SfButton sfbutton = button as SfButton;
                     sfbutton.Enabled = !checkBox1.Checked;
                 }
             }
         }
     }
 }
        protected override void OnAttachedTo(ContentPage bindable)
        {
            buttonDoc = bindable.FindByName <SfButton>("buttonDocs");
            Grid       grid = bindable.FindByName <Grid>("Grid_NRP");
            ScrollView sv   = bindable.FindByName <ScrollView>("SV_NRP");

            base.OnAttachedTo(bindable);
            dataForm = bindable.FindByName <SfDataForm>("dfTramite");

            //buttonDoc = dataForm.Parent.Parent.AutomationId;
            string t  = string.Empty;//dataForm?.Parent?.Parent?.AutomationId;
            string tt = dataForm?.Parent?.ToString();

            App.Current.MainPage.DisplayAlert("DataFormTramiteBehavior", $"OnAttachedTo: [{buttonDoc.AutomationId}] - [{grid.AutomationId} - [{sv.AutomationId}]", MessageCenter.appLabelAceptar);
            dataForm.SourceProvider = new SourceProviderExt();
            dataForm.RegisterEditor("TipoTramite", "Picker");
            //  dataForm.RegisterEditor("image"        , new CustomImageEditor(dataForm));
            //  dataForm.RegisterEditor("TenenciaImage", "image");

            dataForm.AutoGeneratingDataFormItem += DataForm_AutoGeneratingDataFormItem;

            //dataForm.ItemManager = new DataFormItemManagerExt(dataForm);
        }
        public void TabIndexing()
        {
            for (int i = 1; i <= 16; i++)
            {
                string             secname  = "txtclass" + (i).ToString();
                BunifuMetroTextbox lbl_text = this.Controls.Find(secname, true).FirstOrDefault() as BunifuMetroTextbox;
                lbl_text.TabIndex = i;
            }

            SfButton btn = this.Controls.Find("btnsaveclass", true).FirstOrDefault() as SfButton;

            btn.TabIndex = 17;

            for (int i = 1; i <= 16; i++)
            {
                string             secname  = "txtsec" + (i).ToString();
                BunifuMetroTextbox lbl_text = this.Controls.Find(secname, true).FirstOrDefault() as BunifuMetroTextbox;
                lbl_text.TabIndex = (i + 1) + 16;
            }
            SfButton btn1 = this.Controls.Find("btnsavesection", true).FirstOrDefault() as SfButton;

            btn1.TabIndex = 34;
        }
Example #23
0
        private void sfButtonAdd_Click(object sender, EventArgs e) //add button 클릭 시
        {
            AddCategory AddForm = new AddCategory();

            AddForm.ShowDialog();
            if (selectedColorFlagFromAddForm)
            {
                SfButton sfButton = new SfButton();
                sfButton.Click += CategoryBtnClick;
                //Initialize the font, location, name, size and text for the SfButton.
                sfButton.Font                   = new System.Drawing.Font("Segoe UI Semibold", 9F);
                sfButton.Size                   = new System.Drawing.Size(96, 28);
                sfButton.Text                   = CategoryNameFromAddForm;
                sfButton.Style.BackColor        = BlockColorFromAddForm; //기본 바탕색 변경
                sfButton.Style.FocusedBackColor = BlockColorFromAddForm; //포커싱 됬을 때 바탕색 변경
                sfButton.Style.HoverBackColor   = BlockColorFromAddForm; //마우스 올렸을 때 바탕색 변경
                sfButton.Style.PressedBackColor = BlockColorFromAddForm; //클릭한 상태 바탕색 변경

                //Add the SfButton into the form.
                flowLayoutPanelCategory.Controls.Add(sfButton);
                CategoryBtns.Add(sfButton);
                selectedColorFlagFromAddForm = false; //처리가 다 끝나면 다시 false를 해주어야 다음에 동일 처리가 가능하다.
            }
        }
Example #24
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.listBox1      = new System.Windows.Forms.ListBox();
     this.okButton      = new Syncfusion.WinForms.Controls.SfButton();
     this.cancelButton_ = new Syncfusion.WinForms.Controls.SfButton();
     this.SuspendLayout();
     //
     // listBox1
     //
     this.listBox1.BackColor = System.Drawing.Color.White;
     this.listBox1.DrawMode  = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     this.listBox1.Items.AddRange(new object[] {
         "Text Editor",
         "Image Editor"
     });
     this.listBox1.Location     = new System.Drawing.Point(12, 21);
     this.listBox1.Name         = "listBox1";
     this.listBox1.Size         = new System.Drawing.Size(174, 43);
     this.listBox1.TabIndex     = 0;
     this.listBox1.DrawItem    += new System.Windows.Forms.DrawItemEventHandler(this.listBox1_DrawItem);
     this.listBox1.DoubleClick += new System.EventHandler(this.listBox1_DoubleClick);
     //
     // okButton
     //
     this.okButton.AccessibleName          = "Button";
     this.okButton.BackColor               = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(117)))), ((int)(((byte)(153)))));
     this.okButton.DialogResult            = System.Windows.Forms.DialogResult.OK;
     this.okButton.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
     this.okButton.ForeColor               = System.Drawing.Color.White;
     this.okButton.Location                = new System.Drawing.Point(12, 70);
     this.okButton.Name                    = "okButton";
     this.okButton.Size                    = new System.Drawing.Size(78, 23);
     this.okButton.Style.BackColor         = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(117)))), ((int)(((byte)(153)))));
     this.okButton.Style.ForeColor         = System.Drawing.Color.White;
     this.okButton.TabIndex                = 1;
     this.okButton.Text                    = "&OK";
     this.okButton.UseVisualStyleBackColor = false;
     //
     // cancelButton_
     //
     this.cancelButton_.AccessibleName          = "Button";
     this.cancelButton_.BackColor               = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(117)))), ((int)(((byte)(153)))));
     this.cancelButton_.DialogResult            = System.Windows.Forms.DialogResult.Cancel;
     this.cancelButton_.Font                    = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
     this.cancelButton_.ForeColor               = System.Drawing.Color.White;
     this.cancelButton_.Location                = new System.Drawing.Point(111, 70);
     this.cancelButton_.Name                    = "cancelButton_";
     this.cancelButton_.Size                    = new System.Drawing.Size(75, 23);
     this.cancelButton_.Style.BackColor         = System.Drawing.Color.FromArgb(((int)(((byte)(79)))), ((int)(((byte)(117)))), ((int)(((byte)(153)))));
     this.cancelButton_.Style.ForeColor         = System.Drawing.Color.White;
     this.cancelButton_.TabIndex                = 2;
     this.cancelButton_.Text                    = "&Cancel";
     this.cancelButton_.UseVisualStyleBackColor = false;
     //
     // DocumentTypeSelectionDialog
     //
     this.AcceptButton      = this.okButton;
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.CancelButton      = this.cancelButton_;
     this.ClientSize        = new System.Drawing.Size(200, 112);
     this.ControlBox        = false;
     this.Controls.Add(this.cancelButton_);
     this.Controls.Add(this.okButton);
     this.Controls.Add(this.listBox1);
     this.Font            = new System.Drawing.Font("Microsoft Sans Serif", 8.25F);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Name            = "DocumentTypeSelectionDialog";
     this.SizeGripStyle   = System.Windows.Forms.SizeGripStyle.Hide;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text            = "Document Type";
     this.Load           += new System.EventHandler(this.DocumentTypeSelectionDialog_Load);
     this.ResumeLayout(false);
 }
Example #25
0
        public ResultFrame()
        {
            this.Visual  = VisualMarker.Material;
            Margin       = new Thickness(20, 25, 20, 10);
            CornerRadius = 20;

            this.TitleLabel = new PartemLabelBold
            {
                Text          = "Here's what we found:",
                LineBreakMode = Xamarin.Forms.LineBreakMode.WordWrap
            };

            this.BiasIcon = new BiasIcon();

            this.BiasLabel = new PartemLabelBold
            {
                Text            = "Center",
                VerticalOptions = LayoutOptions.Center,
                FontSize        = 35
            };

            this.ArticleFrame = new ArticleFrame();

            this.BiasStatementLabel = new PartemLabelLight
            {
                Text          = "Using the power of AI, we determined that this article contains little to no bias.",
                LineBreakMode = Xamarin.Forms.LineBreakMode.WordWrap,
                Margin        = new Thickness(0, 0, 0, 15)
            };

            this.GraphLabel = new PartemLabelLight
            {
                Text          = "Here’s how confident we are on each bias side:",
                LineBreakMode = Xamarin.Forms.LineBreakMode.WordWrap
            };

            this.Graph = new ConfidenceGraph();

            this.ShareButton = new SfButton
            {
                Text               = "Share",
                FontFamily         = Device.RuntimePlatform == Device.iOS ? "Nexa-Bold" : null,
                FontSize           = 20,
                TextColor          = Color.White,
                CornerRadius       = 20,
                HeightRequest      = 50,
                BackgroundGradient = new SfLinearGradientBrush
                {
                    GradientStops =
                    {
                        new SfGradientStop {
                            Color = Color.FromHex("#2980B9"), Offset = 0
                        },
                        new SfGradientStop {
                            Color = Color.FromHex("#6DD5FA"), Offset = 0.5
                        },
                        new SfGradientStop {
                            Color = Color.FromHex("#DDF4FC"), Offset = 1
                        }
                    }
                },
                HasShadow = true,
            };

            this.Content = new StackLayout
            {
                Children =
                {
                    this.TitleLabel,
                    new StackLayout
                    {
                        Orientation = StackOrientation.Horizontal,
                        Children    =
                        {
                            this.BiasIcon,
                            this.BiasLabel
                        }
                    },
                    this.ArticleFrame,
                    this.BiasStatementLabel,
                    this.GraphLabel,
                    this.Graph,
                    this.ShareButton
                }
            };
            this.BindingContextChanged += ResultFrame_BindingContextChanged;
        }
        private void ForgotPasswordLabel_Tapped(object sender, EventArgs e)
        {
            var popupLayout = new SfPopupLayout();

            popupLayout.PopupView.AnimationMode = AnimationMode.Zoom;
            popupLayout.PopupView.ShowHeader    = false;
            popupLayout.PopupView.ShowFooter    = false;

            var templateView = new DataTemplate(() =>
            {
                var label = new Label
                {
                    Text = "Please enter your email in the field below, then check your inbox for a link to reset your password.",
                    HorizontalOptions       = LayoutOptions.Center,
                    HorizontalTextAlignment = TextAlignment.Center,
                    FontSize = 18,
                };

                var stackLayout = new StackLayout()
                {
                    HorizontalOptions = LayoutOptions.Center,
                    VerticalOptions   = LayoutOptions.CenterAndExpand
                };

                var buttonLayout = new StackLayout()
                {
                    HorizontalOptions = LayoutOptions.Center,
                    Orientation       = StackOrientation.Horizontal
                };

                Entry emailEntry = new Entry()
                {
                    Placeholder             = "Email",
                    HorizontalTextAlignment = TextAlignment.Center,
                    HorizontalOptions       = LayoutOptions.FillAndExpand,
                    Margin = new Thickness(5, 0, 5, 0)
                };

                var sendButton = new SfButton()
                {
                    Text              = "Send",
                    WidthRequest      = 65d,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                };

                var cancelButton = new SfButton()
                {
                    Text              = "Cancel",
                    WidthRequest      = 65d,
                    HorizontalOptions = LayoutOptions.FillAndExpand,
                };

                sendButton.Clicked += (s, a) =>
                {
                    string email = emailEntry.Text;
                    (BindingContext as LoginPageViewModel).ForgotPasswordCommand.Execute(email);
                    popupLayout.IsOpen = false;
                };
                cancelButton.Clicked += (s, a) =>
                {
                    popupLayout.IsOpen = false;
                };

                buttonLayout.Children.Add(sendButton);
                buttonLayout.Children.Add(cancelButton);

                stackLayout.Children.Add(label);
                stackLayout.Children.Add(emailEntry);
                stackLayout.Children.Add(buttonLayout);

                return(stackLayout);
            });

            popupLayout.PopupView.ContentTemplate = templateView;

            popupLayout.Show();
        }
        public Form1()
        {
            InitializeComponent();
            try
            {
                System.Drawing.Icon ico = new System.Drawing.Icon(GetIconFile(@"common\Images\Grid\Icon\sficon.ico"));
                this.Icon = ico;
            }
            catch { }

            data = new OrderInfoCollection();
            sfDataGrid1.DataSource = data.OrdersListDetails;
            GridSettings();
            this.Padding        = new Padding(0, this.Style.TitleBar.Height, 0, 0);
            this.IsMdiContainer = true;

            // Use the [AttachToMdiContainer](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Tools.Windows~Syncfusion.Windows.Forms.Tools.TabbedMDIManager~AttachToMdiContainer.html) function only when the `AttachedTo` property of TabbedMDIManager is not set to Form1.

            this.tabbedMDIManager.AttachToMdiContainer(this);
            this.tabbedMDIManager.TabStyle = typeof(Syncfusion.Windows.Forms.Tools.TabRendererOffice2016Colorful);

            Form form = new Form();

            form.MdiParent = this;
            form.Text      = "Tab1";
            form.Show();

            Form form1 = new Form();

            form1.Text      = "Tab2";
            form1.MdiParent = this;
            form1.Show();

            #region TitleBarControl Customizations
            this.Style.TitleBar.Height = 38;
            this.CenterToScreen();
            this.MinimumSize = this.Size;
            panel            = new FlowLayoutPanel();
            panel.Size       = new System.Drawing.Size(1061, 24);

            titleLabel          = new Label();
            titleLabel.Location = new Point(3, 3);
            titleLabel.Font     = new Font("Segeo UI", 13, FontStyle.Regular);
            titleLabel.Text     = "Label1";

            titleLabel1          = new Label();
            titleLabel1.Location = new Point(3, 3);
            titleLabel1.Font     = new Font("Segeo UI", 13, FontStyle.Regular);
            titleLabel1.Text     = "label2";

            titleLabel2          = new Label();
            titleLabel2.Location = new Point(3, 3);
            titleLabel2.Font     = new Font("Segeo UI", 13, FontStyle.Regular);
            titleLabel2.Text     = "Label3";

            searchBox                     = new TextBoxExt();
            searchBox.Text                = "Quick Search";
            searchBox.ForeColor           = SystemColors.GrayText;
            searchBox.Leave              += SearchBox_Leave;
            searchBox.Enter              += SearchBox_Enter;
            searchBox.Size                = new System.Drawing.Size(276, 26);
            searchBox.BorderStyle         = BorderStyle.FixedSingle;
            searchBox.BorderColor         = ColorTranslator.FromHtml("#0AA2E6");
            searchBox.KeyUp              += SearchBox_KeyUp;
            searchBox.Anchor              = AnchorStyles.Right;
            this.Style.TitleBar.BackColor = Color.White;

            // added the Image via button control
            button      = new SfButton();
            button.Size = new System.Drawing.Size(30, 21);
#if NETCORE
            button.Image = Image.FromFile("../../../Images/search.png");
#else
            button.Image = Image.FromFile("../../Images/search.png");
#endif
            button.BackColor = Color.White;
            button.Style.FocusedBackColor = Color.White;
            button.Style.HoverBackColor   = Color.White;
            button.Style.PressedBackColor = Color.White;
            button.Style.FocusedBorder    = Pens.White;
            button.Style.Border           = Pens.White;
            button.Style.PressedBorder    = Pens.White;
            button.Style.HoverBorder      = Pens.White;
            button.Width  = 29;
            button1       = new SfButton();
            button1.Size  = new System.Drawing.Size(30, 21);
            button1.Width = 50;
            button1.Text  = "Button";

            panel.Controls.Add(titleLabel);
            panel.Controls.Add(titleLabel1);
            panel.Controls.Add(titleLabel2);
            panel.Controls.Add(button);
            panel.Controls.Add(searchBox);
            panel.Controls.Add(button1);

            this.TitleBarTextControl = panel;

            titleLabel.MouseDown += TitleLabel_MouseDown;
            #endregion
        }
Example #28
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components                  = new System.ComponentModel.Container();
     this.panel1                      = new System.Windows.Forms.Panel();
     this.btn_deserialize             = new Syncfusion.WinForms.Controls.SfButton();
     this.btn_serialize               = new Syncfusion.WinForms.Controls.SfButton();
     this.label4                      = new System.Windows.Forms.Label();
     this.format_Combo                = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
     this.autoComplete_Combo          = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
     this.label3                      = new System.Windows.Forms.Label();
     this.dataSource_ComboBox         = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
     this.label2                      = new System.Windows.Forms.Label();
     this.label1                      = new System.Windows.Forms.Label();
     this.comboBoxAdv1                = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv();
     this.panel2                      = new System.Windows.Forms.Panel();
     this.label5                      = new System.Windows.Forms.Label();
     this.textBox1                    = new Syncfusion.Windows.Forms.Tools.TextBoxExt();
     this.autoComplete1               = new Syncfusion.Windows.Forms.Tools.AutoComplete(this.components);
     this.autoCompleteDataColumnInfo1 = new Syncfusion.Windows.Forms.Tools.AutoCompleteDataColumnInfo("Flag", 100, true);
     this.autoCompleteDataColumnInfo2 = new Syncfusion.Windows.Forms.Tools.AutoCompleteDataColumnInfo("Country", 100, true);
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.format_Combo)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.autoComplete_Combo)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSource_ComboBox)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv1)).BeginInit();
     this.panel2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.textBox1)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.autoComplete1)).BeginInit();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                | System.Windows.Forms.AnchorStyles.Left)));
     this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.panel1.Controls.Add(this.btn_deserialize);
     this.panel1.Controls.Add(this.btn_serialize);
     this.panel1.Controls.Add(this.label4);
     this.panel1.Controls.Add(this.format_Combo);
     this.panel1.Controls.Add(this.autoComplete_Combo);
     this.panel1.Controls.Add(this.label3);
     this.panel1.Controls.Add(this.dataSource_ComboBox);
     this.panel1.Controls.Add(this.label2);
     this.panel1.Location = new System.Drawing.Point(492, 12);
     this.panel1.Margin   = new System.Windows.Forms.Padding(2);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(272, 421);
     this.panel1.TabIndex = 1;
     //
     // btn_deserialize
     //
     this.btn_deserialize.AccessibleName = "Button";
     this.btn_deserialize.Font           = new System.Drawing.Font("Segoe UI Semibold", 9F);
     this.btn_deserialize.Location       = new System.Drawing.Point(127, 228);
     this.btn_deserialize.Margin         = new System.Windows.Forms.Padding(2);
     this.btn_deserialize.Name           = "btn_deserialize";
     this.btn_deserialize.Size           = new System.Drawing.Size(123, 23);
     this.btn_deserialize.TabIndex       = 7;
     this.btn_deserialize.Text           = "Deserialize";
     this.btn_deserialize.Click         += new System.EventHandler(this.btn_deserialize_Click);
     //
     // btn_serialize
     //
     this.btn_serialize.AccessibleName = "Button";
     this.btn_serialize.Font           = new System.Drawing.Font("Segoe UI Semibold", 9F);
     this.btn_serialize.Location       = new System.Drawing.Point(127, 180);
     this.btn_serialize.Margin         = new System.Windows.Forms.Padding(2);
     this.btn_serialize.Name           = "btn_serialize";
     this.btn_serialize.Size           = new System.Drawing.Size(123, 23);
     this.btn_serialize.TabIndex       = 6;
     this.btn_serialize.Text           = "Serialize";
     this.btn_serialize.Click         += new System.EventHandler(this.btn_serialize_Click);
     //
     // label4
     //
     this.label4.AutoSize = true;
     this.label4.Location = new System.Drawing.Point(14, 133);
     this.label4.Margin   = new System.Windows.Forms.Padding(2, 0, 2, 0);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(97, 13);
     this.label4.TabIndex = 5;
     this.label4.Text     = "Format To Serialize";
     //
     // format_Combo
     //
     this.format_Combo.BeforeTouchSize       = new System.Drawing.Size(124, 21);
     this.format_Combo.Location              = new System.Drawing.Point(127, 133);
     this.format_Combo.Margin                = new System.Windows.Forms.Padding(2);
     this.format_Combo.Name                  = "format_Combo";
     this.format_Combo.Size                  = new System.Drawing.Size(124, 21);
     this.format_Combo.TabIndex              = 4;
     this.format_Combo.Text                  = "comboBoxAdv3";
     this.format_Combo.SelectedIndexChanged += new System.EventHandler(this.format_Combo_SelectedIndexChanged);
     //
     // autoComplete_Combo
     //
     this.autoComplete_Combo.BeforeTouchSize       = new System.Drawing.Size(124, 21);
     this.autoComplete_Combo.Location              = new System.Drawing.Point(127, 77);
     this.autoComplete_Combo.Margin                = new System.Windows.Forms.Padding(2);
     this.autoComplete_Combo.Name                  = "autoComplete_Combo";
     this.autoComplete_Combo.Size                  = new System.Drawing.Size(124, 21);
     this.autoComplete_Combo.TabIndex              = 3;
     this.autoComplete_Combo.Text                  = "comboBoxAdv2";
     this.autoComplete_Combo.SelectedIndexChanged += new System.EventHandler(this.autoComplete_Combo_SelectedIndexChanged);
     //
     // label3
     //
     this.label3.AutoSize = true;
     this.label3.Location = new System.Drawing.Point(11, 77);
     this.label3.Margin   = new System.Windows.Forms.Padding(2, 0, 2, 0);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(106, 13);
     this.label3.TabIndex = 2;
     this.label3.Text     = "Auto Complete Mode";
     //
     // dataSource_ComboBox
     //
     this.dataSource_ComboBox.BeforeTouchSize       = new System.Drawing.Size(124, 21);
     this.dataSource_ComboBox.Location              = new System.Drawing.Point(127, 27);
     this.dataSource_ComboBox.Margin                = new System.Windows.Forms.Padding(2);
     this.dataSource_ComboBox.Name                  = "dataSource_ComboBox";
     this.dataSource_ComboBox.Size                  = new System.Drawing.Size(124, 21);
     this.dataSource_ComboBox.TabIndex              = 1;
     this.dataSource_ComboBox.Text                  = "Select Data Source";
     this.dataSource_ComboBox.SelectedIndexChanged += new System.EventHandler(this.dataSource_ComboBox_SelectedIndexChanged);
     //
     // label2
     //
     this.label2.AutoSize = true;
     this.label2.Location = new System.Drawing.Point(11, 27);
     this.label2.Margin   = new System.Windows.Forms.Padding(2, 0, 2, 0);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(70, 13);
     this.label2.TabIndex = 0;
     this.label2.Text     = "Data Source ";
     //
     // label1
     //
     this.label1.AutoSize = true;
     this.label1.Location = new System.Drawing.Point(27, 85);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(91, 20);
     this.label1.TabIndex = 0;
     this.label1.Text     = "Visual Style";
     //
     // comboBoxAdv1
     //
     this.comboBoxAdv1.BackColor       = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.comboBoxAdv1.BeforeTouchSize = new System.Drawing.Size(186, 21);
     this.comboBoxAdv1.DropDownStyle   = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.comboBoxAdv1.Font            = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.comboBoxAdv1.ForeColor       = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
     this.comboBoxAdv1.Items.AddRange(new object[] {
         "Office2019Colorful",
         "HighContrastBlack",
         "Office2016Colorful",
         "Office2016White",
         "Office2016Black",
         "Office2016DarkGray",
         "Metro",
         "Default"
     });
     this.comboBoxAdv1.Location  = new System.Drawing.Point(155, 84);
     this.comboBoxAdv1.Name      = "comboBoxAdv1";
     this.comboBoxAdv1.Size      = new System.Drawing.Size(186, 21);
     this.comboBoxAdv1.Style     = Syncfusion.Windows.Forms.VisualStyle.Office2016Colorful;
     this.comboBoxAdv1.TabIndex  = 3;
     this.comboBoxAdv1.Text      = "Office2019Colorful";
     this.comboBoxAdv1.ThemeName = "Office2016Colorful";
     //
     // panel2
     //
     this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                | System.Windows.Forms.AnchorStyles.Left)));
     this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.panel2.Controls.Add(this.label5);
     this.panel2.Controls.Add(this.textBox1);
     this.panel2.Location = new System.Drawing.Point(4, 12);
     this.panel2.Margin   = new System.Windows.Forms.Padding(2);
     this.panel2.Name     = "panel2";
     this.panel2.Size     = new System.Drawing.Size(480, 421);
     this.panel2.TabIndex = 0;
     //
     // label5
     //
     this.label5.AutoSize = true;
     this.label5.Location = new System.Drawing.Point(78, 148);
     this.label5.Margin   = new System.Windows.Forms.Padding(2, 0, 2, 0);
     this.label5.Name     = "label5";
     this.label5.Size     = new System.Drawing.Size(93, 13);
     this.label5.TabIndex = 3;
     this.label5.Text     = "Enter your option :";
     //
     // textBox1
     //
     this.autoComplete1.SetAutoComplete(this.textBox1, Syncfusion.Windows.Forms.Tools.AutoCompleteModes.MultiSuggestExtended);
     this.textBox1.BackColor       = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
     this.textBox1.BeforeTouchSize = new System.Drawing.Size(201, 22);
     this.textBox1.BorderColor     = System.Drawing.Color.FromArgb(((int)(((byte)(197)))), ((int)(((byte)(197)))), ((int)(((byte)(197)))));
     this.textBox1.BorderStyle     = System.Windows.Forms.BorderStyle.FixedSingle;
     this.textBox1.Cursor          = System.Windows.Forms.Cursors.IBeam;
     this.textBox1.Font            = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.textBox1.ForeColor       = System.Drawing.Color.FromArgb(((int)(((byte)(68)))), ((int)(((byte)(68)))), ((int)(((byte)(68)))));
     this.textBox1.Location        = new System.Drawing.Point(193, 148);
     this.textBox1.Margin          = new System.Windows.Forms.Padding(2);
     this.textBox1.Metrocolor      = System.Drawing.Color.Gray;
     this.textBox1.Name            = "textBox1";
     this.textBox1.Size            = new System.Drawing.Size(201, 22);
     this.textBox1.Style           = Syncfusion.Windows.Forms.Tools.TextBoxExt.theme.Office2016Colorful;
     this.textBox1.TabIndex        = 2;
     this.textBox1.ThemeName       = "Office2019Colorful";
     //
     // autoComplete1
     //
     this.autoComplete1.AdjustHeightToItemCount = false;
     this.autoComplete1.HeaderFont = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
     this.autoComplete1.ItemFont   = new System.Drawing.Font("Segoe UI", 8.25F);
     this.autoComplete1.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(158)))), ((int)(((byte)(218)))));
     this.autoComplete1.ParentForm = this;
     this.autoComplete1.Style      = Syncfusion.Windows.Forms.Tools.AutoCompleteStyle.Default;
     this.autoComplete1.ThemeName  = "Default";
     //
     // autoCompleteDataColumnInfo1
     //
     this.autoCompleteDataColumnInfo1.ColumnHeaderText = "Flag";
     this.autoCompleteDataColumnInfo1.ImageColumn      = false;
     this.autoCompleteDataColumnInfo1.MatchingColumn   = false;
     this.autoCompleteDataColumnInfo1.Visible          = true;
     //
     // autoCompleteDataColumnInfo2
     //
     this.autoCompleteDataColumnInfo2.ColumnHeaderText = "Country";
     this.autoCompleteDataColumnInfo2.ImageColumn      = true;
     this.autoCompleteDataColumnInfo2.MatchingColumn   = false;
     this.autoCompleteDataColumnInfo2.Visible          = true;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.CaptionAlign        = System.Windows.Forms.HorizontalAlignment.Left;
     this.ClientSize          = new System.Drawing.Size(768, 437);
     this.Controls.Add(this.panel1);
     this.Controls.Add(this.panel2);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
     this.Margin          = new System.Windows.Forms.Padding(2);
     this.Name            = "Form1";
     this.ShowMaximizeBox = false;
     this.ShowMinimizeBox = false;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "Data Binding";
     this.panel1.ResumeLayout(false);
     this.panel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.format_Combo)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.autoComplete_Combo)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dataSource_ComboBox)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.comboBoxAdv1)).EndInit();
     this.panel2.ResumeLayout(false);
     this.panel2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.textBox1)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.autoComplete1)).EndInit();
     this.ResumeLayout(false);
 }
Example #29
0
        public AppNavigation()
        {
            NavigationPage.SetHasNavigationBar(this, false);


            var sub = new AbsoluteLayout();

            splashImage = new Image
            {
                Source        = "appIcon.png",
                HeightRequest = 100,
                WidthRequest  = 100
            };

            Label welcome = new Label
            {
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Text           = "Welcome",
                FontAttributes = FontAttributes.Bold,
                FontSize       = 20,
            };

            entry = new Entry
            {
                Style                   = (Style)App.Current.Resources["entryStyle"],
                TextColor               = Color.Black,
                BackgroundColor         = Color.LightYellow,
                Placeholder             = "Email address",
                HorizontalTextAlignment = TextAlignment.Center,
                HorizontalOptions       = LayoutOptions.Fill,
                IsVisible               = false
            };

            submit = new SfButton
            {
                Style             = (Style)App.Current.Resources["buttonStyle"],
                TextColor         = Color.White,
                Text              = "Submit",
                HorizontalOptions = LayoutOptions.Fill,
                IsVisible         = false,
                BackgroundColor   = Color.FromHex("#6495ed"),
                HeightRequest     = 60
            };

            loading = new ActivityIndicator();


            AbsoluteLayout.SetLayoutFlags(splashImage, AbsoluteLayoutFlags.PositionProportional);
            AbsoluteLayout.SetLayoutBounds(splashImage, new Rectangle(0.5, 0.5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));

            sub.Children.Add(splashImage);

            ScrollView scroll = new ScrollView();

            StackLayout layout = new StackLayout
            {
                Spacing         = 20,
                Padding         = new Thickness(15, 10),
                VerticalOptions = LayoutOptions.Center
            };


            StackLayout gap = new StackLayout
            {
                Spacing         = 20,
                Padding         = new Thickness(15, 15),
                VerticalOptions = LayoutOptions.Center
            };

            layout.Children.Add(sub);
            layout.Children.Add(welcome);
            layout.Children.Add(gap);
            layout.Children.Add(entry);
            layout.Children.Add(submit);
            layout.Children.Add(loading);

            scroll.Content       = layout;
            this.BackgroundColor = Color.FromHex("#ffffff");
            this.Content         = scroll;


            if (Ultis.Settings.DeviceUniqueID.Equals("DeviceID"))
            {
                Ultis.Settings.DeviceUniqueID = Guid.NewGuid().ToString("N");
            }

            WebService(Ultis.Settings.DeviceUniqueID);


            submit.Clicked += async(sender, e) =>
            {
                if (!(String.IsNullOrEmpty(entry.Text)))
                {
                    Ultis.Settings.Email = entry.Text;

                    try
                    {
                        loading.IsRunning = true;
                        loading.IsVisible = true;
                        loading.IsEnabled = true;

                        /* clsRegister register = new clsRegister
                         * {
                         *   DeviceId = Ultis.Settings.DeviceUniqueID,
                         *   UserName = "",
                         *   Email = entry.Text,
                         *   MobileNo = "",
                         *   RegNo = "",
                         *   CompanyName = "",
                         *   FirebaseId = firebaseID,
                         *   DeviceIdiom = CrossDeviceInfo.Current.Idiom.ToString(),
                         *   DeviceMfg = CrossDeviceInfo.Current.Manufacturer,
                         *   DeviceModel = CrossDeviceInfo.Current.Model,
                         *   OSPlatform = CrossDeviceInfo.Current.Platform.ToString(),
                         *   OSVer = CrossDeviceInfo.Current.VersionNumber.ToString(),
                         *   AppVer = CrossDeviceInfo.Current.AppVersion,
                         *   AppName = clsRegister.AppNameConst.Business
                         * };
                         *
                         * var content = await CommonFunction.PostRequest(register, Ultis.Settings.SessionBaseURI, ControllerUtil.postRegisterURL());
                         * clsResponse register_response = JsonConvert.DeserializeObject<clsResponse>(content);*/
                        var content = await CommonFunction.CallWebService(0, null, Ultis.Settings.SessionBaseURI, ControllerUtil.emailVerifyURL(entry.Text), this);

                        clsResponse verify_response = JsonConvert.DeserializeObject <clsResponse>(content);

                        if (verify_response.IsGood)
                        {
                            loading.IsRunning = false;
                            loading.IsVisible = false;
                            loading.IsEnabled = false;

                            await Navigation.PushAsync(new CustomerRegistration(content));

                            //Application.Current.MainPage = new AccountActivation();
                        }
                        else
                        {
                            await DisplayAlert("JsonError", verify_response.Message, "OK");
                        }
                    }
                    catch (Exception ex)
                    {
                        await DisplayAlert("Error", ex.Message, "OK");
                    }
                }
                else
                {
                    await DisplayAlert("Missing Field", "Please key in all field", "OK");
                }
            };
        }
        void bumpButton_Clicked(System.Object sender, System.EventArgs e)
        {
            int count = 0;

            foreach (Assignments ass in Asses)
            {
                if (ass.Grade == "NG")
                {
                    count++;
                }
            }

            DataTemplate popupView = new DataTemplate(() =>
            {
                var m = new StackLayout()
                {
                    Orientation = StackOrientation.Vertical, Margin = 5, Spacing = 5, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.FillAndExpand, BackgroundColor = LoginPage.g1
                };

                var topRow = new StackLayout()
                {
                    Orientation = StackOrientation.Horizontal, Spacing = 0, VerticalOptions = LayoutOptions.FillAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand
                };
                var l = new Label()
                {
                    Text = "Bump your grade", TextColor = Color.White, FontSize = 20f, HorizontalTextAlignment = TextAlignment.Center, HorizontalOptions = LayoutOptions.Center
                };
                topRow.Children.Add(l);

                var midRow = new StackLayout()
                {
                    Orientation = StackOrientation.Horizontal, Spacing = 0, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.FillAndExpand
                };
                var l2 = new Label()
                {
                    Text = "Select the grade that you want", TextColor = Color.White, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.Start
                };
                gradeSel = new SfComboBox()
                {
                    WidthRequest = 200, VerticalOptions = LayoutOptions.Center, HorizontalOptions = LayoutOptions.End
                };
                gradeSel.ComboBoxSource = new List <string>()
                {
                    "A", "B", "C", "D", "E"
                };
                gradeSel.Watermark      = "Grade";
                gradeSel.WatermarkColor = Color.White;
                gradeSel.TextColor      = Color.White;
                midRow.Children.Add(l2);
                midRow.Children.Add(gradeSel);

                var botRow = new StackLayout()
                {
                    Orientation = StackOrientation.Vertical, Spacing = 5, VerticalOptions = LayoutOptions.End, HorizontalOptions = LayoutOptions.FillAndExpand
                };
                var l3 = new Label()
                {
                    TextColor = Color.White, HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.Start, FontSize = 15f
                };
                l3.Text = count + " assignments found that can be bumped";
                var b   = new SfButton()
                {
                    HorizontalOptions = LayoutOptions.Center, WidthRequest = 80, VerticalOptions = LayoutOptions.End, BackgroundColor = Color.DarkGray, Margin = new Thickness(5, 5)
                };
                b.Clicked  += B_Clicked;
                b.Text      = "Bump";
                b.TextColor = Color.White;
                botRow.Children.Add(l3);
                botRow.Children.Add(b);

                m.Children.Add(topRow);
                m.Children.Add(midRow);
                m.Children.Add(botRow);
                return(m);
            });

            bumpPop.PopupView.ContentTemplate     = popupView;
            bumpPop.PopupView.AutoSizeMode        = AutoSizeMode.Both;
            bumpPop.PopupView.ShowHeader          = false;
            bumpPop.PopupView.ShowFooter          = false;
            bumpPop.ClosePopupOnBackButtonPressed = true;
            bumpPop.Show();
        }