Ejemplo n.º 1
0
        private void Remove(object paramObj)
        {
            ParamViewModel param = paramObj as ParamViewModel;

            if (param == null)
            {
                System.Console.WriteLine("ParamisNullParamisNullParamisNullParamisNullParamisNullParamisNullParamisNullParamisNullParamisNull");
                return;
            }
            System.Console.WriteLine("ParamisNOTNullParamisNOTNullParamisNOTNullParamisNOTNullParamisNOTNullParamisNOTNull");

            Params.Remove(param);
            App.DatabaseParam.DeleteItem(param.Param.Id);
        }
Ejemplo n.º 2
0
        private void MoveToTop(object paramObj)
        {
            ParamViewModel param = paramObj as ParamViewModel;

            if (param == null)
            {
                return;
            }
            int oldIndex = Params.IndexOf(param);

            if (oldIndex > 0)
            {
                Params.Move(oldIndex, oldIndex - 1);
            }
        }
Ejemplo n.º 3
0
        private void MoveToBottom(object paramObj)
        {
            ParamViewModel param = paramObj as ParamViewModel;

            if (param == null)
            {
                return;
            }
            int oldIndex = Params.IndexOf(param);

            if (oldIndex < Params.Count - 1)
            {
                Params.Move(oldIndex, oldIndex + 1);
            }
        }
Ejemplo n.º 4
0
        private void CreateParam(object name)
        {
            ParamViewModel AddedPar = new ParamViewModel()
            {
                Param = new Param {
                    atach = Character.Id, Name = name.ToString(), Value = 50
                }, ListViewModel = this
            };

            Params.Add(AddedPar);
            App.DatabaseParam.SaveItem(AddedPar.Param);

            /*List<Param> Qparamss = new List<Param>();
             * Qparamss = App.DatabaseParam.GetItems().ToList();
             * foreach (Param c in Qparamss)
             * {
             *  System.Console.WriteLine(c.Name);
             *  System.Console.WriteLine(c.atach);
             *  System.Console.WriteLine(Character.Id);
             * }*/
        }