Example #1
0
 public Lane(int PrID, string participant)
     : base(PrID, 0, 0)
 {
     categ = Categ.Parameterized;
     Participant = participant;
     Elements = new List<Primitive>();
 }
Example #2
0
 public Flow(Categ c, int sourceID, int targetID, string condition)
 {
     categ = c;
     SourceID = sourceID;
     TargetID = targetID;
     Condition = condition;
 }
Example #3
0
 public Flow(int PrID, Categ c, int sourceID, int targetID, string condition)
     : base(PrID, 0, 0)
 {
     categ = c;
     SourceID = sourceID;
     TargetID = targetID;
     Condition = condition;
 }
Example #4
0
        public void DeleteCategory(int CategoryId)
        {
            Categ categ = context.Categs.Find(CategoryId);

            if (categ != null)
            {
                context.Categs.Remove(categ);
                context.SaveChanges();
            }
        }
Example #5
0
 public ActionResult AddUpdateCateogry(Categ category)
 {
     if (ModelState.IsValid)
     {
         repository.SaveCategory(category);
         return(Content("True"));
     }
     else
     {
         return(Content("False"));
     }
 }
Example #6
0
 public ViewResult AddUpdateCateogry(int CategoryId)
 {
     if (CategoryId > 0)
     {
         Categ categ = repository.CategoriesName.FirstOrDefault(c => c.CategoryId == CategoryId);
         return(View(categ));
     }
     else
     {
         return(View());
     }
 }
        public Leiloes()
        {
            InitializeComponent();

            var mainWindow = (MainWindow)Application.Current.MainWindow;

            ahref    = mainWindow.ah;
            username = ahref.getUsername();

            Categ.AddHandler(ComboBox.SelectionChangedEvent, new RoutedEventHandler(Search_Options_Changed));
            SortPrice.AddHandler(ComboBox.SelectionChangedEvent, new RoutedEventHandler(Search_Options_Changed));

            setLeiloes("", "Todos", "Preço menor");
        }
        public MeusLeiloes(String username)
        {
            InitializeComponent();

            var mainWindow = (MainWindow)Application.Current.MainWindow;

            ahref = mainWindow.ah;

            Categ.AddHandler(ComboBox.SelectionChangedEvent, new RoutedEventHandler(Search_Options_Changed));
            SortPrice.AddHandler(ComboBox.SelectionChangedEvent, new RoutedEventHandler(Search_Options_Changed));
            Categoria.AddHandler(ComboBox.SelectionChangedEvent, new RoutedEventHandler(Search_Options_Changed));
            DayCount.AddHandler(ComboBox.SelectionChangedEvent, new RoutedEventHandler(Search_Options_Changed));
            this.username = username;
            setLeiloes("", "Todos", "Preço menor");
        }
Example #9
0
        public void SaveCategory(Categ category)
        {
            Categ categ = new Categ();

            if (category.CategoryId == 0)
            {
                categ.CategoryId = context.Categs.Max(c => c.CategoryId) + 1;
                context.Categs.Add(categ);
            }
            else
            {
                categ = context.Categs.FirstOrDefault(c => c.CategoryId == category.CategoryId);
            }
            categ.CategoryName = category.CategoryName;
            categ.IsActive     = category.IsActive;
            categ.IsDelete     = false;

            context.SaveChanges();
        }
Example #10
0
    public Achievement(Categ type)
    {
        categ = type;

        switch (categ)
        {
            case Categ.ProcessPublished:
                Name = "First process published";
                ScorePoints = 20;
                break;
            case Categ.ProposedVersion:
                Name = "Proposed modifications to all player's processes.";
                ScorePoints = 20;
                break;
            case Categ.VotedProcessPlayers:
                Name = "Voted processes from all other players.";
                ScorePoints = 20;
                break;
            case Categ.CorrectedOwnProcess:
                Name = "Corrected a process previously created.";
                ScorePoints = 20;
                break;
        }
    }
Example #11
0
    public Medal(Categ type)
    {
        categ = type;

        switch (categ)
        {
            case Categ.FirstProcessPublished:
                Name = "First process published in the game";
                ScorePoints = 100;
                break;
            case Categ.MarkedProcessDuplicated:
                Name = "Marked a process as a duplicate correctly.";
                ScorePoints = 25;
                break;
            case Categ.BestQualityContent:
                Name = "Created process with best quality vote rate.";
                ScorePoints = 70;
                break;
            case Categ.BestVoteConvergence:
                Name = "Best convergence in votes placed.";
                ScorePoints = 150;
                break;
        }
    }
Example #12
0
 public Event(int PrID, Categ c, float x, float y)
     : base(PrID, x, y)
 {
     categ = c;
 }
Example #13
0
 public Event(Categ c)
 {
     categ = c;
 }
Example #14
0
 public Lane(int PrID)
     : base(PrID, 0, 0)
 {
     categ = Categ.Default;
     Elements = new List<Primitive>();
 }
Example #15
0
 public Lane(string participant)
 {
     categ = Categ.Parameterized;
     Participant = participant;
     Elements = new List<Primitive>();
 }
Example #16
0
 public Lane()
 {
     categ = Categ.Default;
     Elements = new List<Primitive>();
 }