Exemplo n.º 1
0
 public PhotoPreview(Account account, bool _ChangeProfilePic)
 {
     InitializeComponent();
     AccountGiven = account;
     ChangeProfilePic = _ChangeProfilePic;
     TitleField.SetValue(IsVisibleProperty, false);
 }
Exemplo n.º 2
0
 public void FillTitleContent(string title, string content)
 {
     TitleField.Clear();
     TitleField.SendKeys(title);
     ContentField.Clear();
     ContentField.SendKeys(content);
     CreateButton.Click();
 }
 public ViewBlogPostPageObject CreateNewPost(string title, DateTime blogPostDate, string bodyText)
 {
     TitleField.SendKeys(title);
     DateField.SendKeys(blogPostDate.ToShortDateString());
     BodyTextField.SendKeys(bodyText);
     SaveButton.Click();
     return(new ViewBlogPostPageObject(driver));
 }
Exemplo n.º 4
0
        /*Actions*/

        //Enter Site Name and Description
        public void SiteNameAndDescription(String title, String description)
        {
            WaitElement(TitleField);
            TitleField.SendKeys(Keys.Control + "a" + Keys.Delete);
            TitleField.SendKeys(title);
            DescriptionField.SendKeys(Keys.Control + "a" + Keys.Delete);
            DescriptionField.SendKeys(description);
        }
Exemplo n.º 5
0
        /// <summary>
        /// プリセットを開く
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OpenMenuClick(object sender, RoutedEventArgs e)
        {
            titleListView.Items.Clear();

            selectedTitle      = null;
            selectedTitleIndex = -1;
            selectedCharacter  = null;
            selectedTitleIndex = -1;

            // ダイアログを開く
            var dialog = new Microsoft.Win32.OpenFileDialog
            {
                // フィルタ
                Filter      = "JSONファイル(*.json)|*.json",
                FilterIndex = 1
            };

            if (dialog.ShowDialog() == true)
            {
                IsEnabled = false;
                ReadJson(dialog.FileName);
                IsEnabled = true;
            }

            if (presets == null)
            {
                return;
            }

            // タイトルバーに開いているファイル名を設定する
            Title = dialog.SafeFileName + " - PresetManager";

            // TextBoxをクリアする
            TitleField.Clear();
            ExplainField.Clear();
            CharacterField.Clear();

            foreach (var preset in presets)
            {
                titleListView.Items.Add(preset.Title);
            }
        }
Exemplo n.º 6
0
 public IReadOnlyCollection <Title> GetTitles(TitleField field) => TitleData.Get(field);
Exemplo n.º 7
0
 public void EditTitle()
 {
     TitleField.SendKeys("This should not be visible");
 }
Exemplo n.º 8
0
 private void OnLoaded(object sender, RoutedEventArgs e)
 {
     TitleField.Focus(FocusState.Keyboard);
 }
Exemplo n.º 9
0
        protected override void Serialize(IDictionary <string, object> json)
        {
            var dataSource = DataSource.ToJson();

            if (dataSource.Any())
            {
                json["dataSource"] = dataSource;
            }

            if (Subdomains != null)
            {
                json["subdomains"] = Subdomains;
            }

            //>> Serialization

            if (Attribution.HasValue())
            {
                json["attribution"] = Attribution;
            }

            if (AutoBind.HasValue)
            {
                json["autoBind"] = AutoBind;
            }

            if (Extent != null)
            {
                json["extent"] = Extent;
            }

            if (Key.HasValue())
            {
                json["key"] = Key;
            }

            if (LocationField.HasValue())
            {
                json["locationField"] = LocationField;
            }

            if (TitleField.HasValue())
            {
                json["titleField"] = TitleField;
            }

            if (Opacity.HasValue())
            {
                json["opacity"] = Opacity;
            }

            var style = Style.ToJson();

            if (style.Any())
            {
                json["style"] = style;
            }

            if (UrlTemplateId.HasValue())
            {
                json["urlTemplate"] = UrlTemplateId;
            }

            if (Type.HasValue)
            {
                json["type"] = Type;
            }

            //<< Serialization

            var tooltip = Tooltip.ToJson();

            if (tooltip.Any())
            {
                json["tooltip"] = tooltip;
            }

            if (ShapeName.HasValue())
            {
                json["shape"] = ShapeName;
            }
            else if (Shape.HasValue)
            {
                var shapeName = Shape.ToString();
                json["shape"] = shapeName.ToLowerInvariant()[0] + shapeName.Substring(1);
            }
        }
Exemplo n.º 10
0
        public void FillForm()
        {
            IsVisible(By.Id("AddressLine1Field"));
            AddressLine1Field.Clear();
            SendData(AddressLine1Field, "1");

            IsVisible(By.Id("AddressLine2Field"));
            AddressLine2Field.Clear();
            SendData(AddressLine2Field, "1");

            IsVisible(By.Id("BusinessPhoneField"));
            BusinessPhoneField.Clear();
            SendData(BusinessPhoneField, "1");

            IsVisible(By.Id("CityField"));
            CityField.Clear();
            SendData(CityField, "1");

            IsVisible(By.Id("CompanyPhoneField"));
            CompanyPhoneField.Clear();
            SendData(CompanyPhoneField, "1");

            IsVisible(By.Id("ContactAddressLine1Field"));
            ContactAddressLine1Field.Clear();
            SendData(ContactAddressLine1Field, "1");

            IsVisible(By.Id("ContactAddressLine2Field"));
            ContactAddressLine2Field.Clear();
            SendData(ContactAddressLine2Field, "1");

            IsVisible(By.Id("ContactCityField"));
            ContactCityField.Clear();
            SendData(ContactCityField, "1");

            IsClickable(ContactStateField);
            ContactStateFieldOption.SelectByIndex(1);

            IsVisible(By.Id("ContactZipField"));
            ContactZipField.Clear();
            SendData(ContactZipField, "1");

            IsVisible(By.Id("EmailField"));
            EmailField.Clear();
            SendData(EmailField, "1");

            IsVisible(By.Id("FirstNameField"));
            FirstNameField.Clear();
            SendData(FirstNameField, "1");

            IsVisible(By.Id("LastNameField"));
            LastNameField.Clear();
            SendData(LastNameField, "1");

            IsVisible(By.Id("MiddleNameField"));
            MiddleNameField.Clear();
            SendData(MiddleNameField, "1");

            IsVisible(By.Id("MobilePhoneField"));
            MobilePhoneField.Clear();
            SendData(MobilePhoneField, "1");

            IsVisible(By.Id("OrganizationNameFilteredField"));
            OrganizationNameFilteredField.Clear();
            SendData(OrganizationNameFilteredField, "1");

            IsClickable(OrganizationTypeField);
            OrganizationTypeFieldOption.SelectByIndex(1);

            IsVisible(By.Id("OrganizationWebsiteField"));
            OrganizationWebsiteField.Clear();
            SendData(OrganizationWebsiteField, "1");

            IsClickable(OwnerField);
            OwnerFieldOption.SelectByIndex(1);

            IsClickable(ProgramField);
            ProgramFieldOption.SelectByIndex(1);

            IsVisible(By.Id("SameAddressField"));
            SameAddressField.Clear();
            SendData(SameAddressField, "1");

            IsClickable(SectorField);
            SectorFieldOption.SelectByIndex(1);

            IsClickable(SolicitationField);
            SolicitationFieldOption.SelectByIndex(1);

            IsClickable(StateField);
            StateFieldOption.SelectByIndex(1);

            IsVisible(By.Id("TitleField"));
            TitleField.Clear();
            SendData(TitleField, "1");

            IsVisible(By.Id("ZipField"));
            ZipField.Clear();
            SendData(ZipField, "1");
        } // close FillForm
Exemplo n.º 11
0
 public void EditTitle()
 {
     TitleField.Clear();
     TitleField.SendKeys("TestArticle12345-EditTitle");
     EditButton.Click();
 }
 public IReadOnlyCollection <Title> GetTitles(TitleField field) => throw new NotImplementedException();
Exemplo n.º 13
0
 /// <summary>
 /// Check to see of the Title field contains a given value
 /// </summary>
 /// <param name="jobTitle">The value to check for</param>
 /// <returns>True if the field contains the value, false otherwise</returns>
 public bool TitleFieldContains(string jobTitle)
 {
     return(TitleField.GetAttribute("value").Contains(jobTitle));
 }
Exemplo n.º 14
0
 public static IReadOnlyCollection <Title> Get(TitleField field) =>
 field switch
 {