private void Button_Click_1(object sender, RoutedEventArgs e) { var form = new NewProperty(); form.ShowDialog(); if (!string.IsNullOrWhiteSpace(form.result)) { var context = this.DataContext as ItemClass; if (context.ItemProperties.Where(a => a.Name == form.result).Count() == 0) { context.ItemProperties.Add(new Variable { Name = form.result }); foreach (var a in context.GetAllChildItems()) { a.PopulateProperties(); } } else { MessageBox.Show("A property with that name already exists. Please choose another name."); Button_Click_1(sender, e); } } }
public void Upload(List <string> list, string m) { Console.Write("\nВведите объект, который хотите добавить: "); string name = Console.ReadLine(); list.Add(name); NewProperty?.Invoke(list, "Добавлено.\n"); }
public void Add_Exis_Property() { // creates a toggle for the given test, adds all log events under it test = extent.StartTest("Check whether the user is able to add an existing property"); NewProperty Exis = new NewProperty(); Exis.AddExisProperty(); }
public void Empty_Property() { // creates a toggle for the given test, adds all log events under it test = extent.StartTest("Check whether the user is able to add the property with out putting any data"); NewProperty Empty = new NewProperty(); Empty.Empty_property(); }
public void Delete_Property() { // creates a toggle for the given test, adds all log events under it test = extent.StartTest("Check whether the user is able to edit property"); NewProperty delete = new NewProperty(); delete.DeleteProperty(); }
public void Add_New_Property() { // creates a toggle for the given test, adds all log events under it test = extent.StartTest("Check whether the user is able to add a new property with valid data"); NewProperty Add = new NewProperty(); Add.AddnewProperty(); }
public void Edit_propety() { // creates a toggle for the given test, adds all log events under it test = extent.StartTest("Check whether the user is able to edit property"); NewProperty Edit = new NewProperty(); Edit.EditProperty(); }
public void Upload(List <string> list, string m) { Console.Write("\nВведите объект, который хотите добавить: "); string name = Console.ReadLine(); list.Add(name); NewProperty?.Invoke(list, "Добавление прошло успешно\nНовый список объектов:"); }
public void Add_New_Property() { // creates a toggle for the given test, adds all log events under it test = extent.StartTest("Check with the valid data to all input fields by clicking Submit button Add New Property"); NewProperty Add = new NewProperty(); Add.AddnewProperty(); }
public static void OnNewPropertyGet(int tag, ref Maid currentMaid, int id) { StatusChangedEventArgs args = new StatusChangedEventArgs { Tag = (MaidChangeType)tag, CallerMaid = currentMaid, BlockAssignment = false, ID = id, Value = -1 }; NewProperty?.Invoke(null, args); }
public void NewPropertyCheck() { var o = new NewProperty { X = "Foo", Y = "Bar" }; BaseProperty b1 = o; b1.X = 123; var bin = MessagePackSerializer.Serialize(o, Resolvers.ContractlessStandardResolver.Options); this.logger.WriteLine(MessagePackSerializer.ConvertToJson(bin)); var v = MessagePackSerializer.Deserialize <NewProperty>(bin, Resolvers.ContractlessStandardResolver.Options); v.IsStructuralEqual(o); // Verify that we still maintain compatibility with deserializing the base type. var b2 = MessagePackSerializer.Deserialize <BaseProperty>(bin, Resolvers.ContractlessStandardResolver.Options); Assert.Equal(b1.X, b2.X); Assert.Equal(b1.Y, b2.Y); }
public void CommandAddOperation() { NewProperty?.Invoke(this, null); }