コード例 #1
0
        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);
                }
            }
        }
コード例 #2
0
ファイル: Programmer.cs プロジェクト: AEkaterina/OOP_3_sem
        public void Upload(List <string> list, string m)
        {
            Console.Write("\nВведите объект, который хотите добавить: ");
            string name = Console.ReadLine();

            list.Add(name);
            NewProperty?.Invoke(list, "Добавлено.\n");
        }
コード例 #3
0
            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();
            }
コード例 #4
0
            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();
            }
コード例 #5
0
            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();
            }
コード例 #6
0
            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();
            }
コード例 #7
0
            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();
            }
コード例 #8
0
        public void Upload(List <string> list, string m)
        {
            Console.Write("\nВведите объект, который хотите добавить: ");
            string name = Console.ReadLine();

            list.Add(name);
            NewProperty?.Invoke(list, "Добавление прошло успешно\nНовый список объектов:");
        }
コード例 #9
0
            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();
            }
コード例 #10
0
        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);
        }
コード例 #11
0
        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);
        }
コード例 #12
0
ファイル: Program.cs プロジェクト: sleepingCat542/OOP1
 public void CommandAddOperation()
 {
     NewProperty?.Invoke(this, null);
 }