private async void setup()
		{
			Functions functions = new Functions();
			JsonValue list;

			if (SearchData == null) {
				list = await functions.getWorkshops ("WorkshopSetId=" +WorkshopSetID.ToString()+
					"&StartingDtBegin=" + DateTime.Now.ToString("yyyy-MM-dd") + 
					"&StartingDtEnd=" + DateTime.Now.AddYears(1).ToString("yyyy-MM-dd"));
			} else {
				list = await functions.getWorkshops (SearchData);
			}
			JsonValue results = list ["Results"];
			tableItems = new List<Workshop>();
			if (list ["IsSuccess"]) {
				for (int i = 0; i < results.Count; i++) {
					Workshop w = new Workshop (results [i]);
					if (w.Archived == null && w.StartDate > DateTime.Now) {
						tableItems.Add (w);
					}
				}
				tableItems.Sort((x, y) => DateTime.Compare(x.StartDate, y.StartDate));
				this.TableView.ReloadData ();
			} else {
				createAlert ("Timeout expired", "Please reload view");
			}
			if (tableItems.Count == 0) {
				createAlert ("Sorry", "There are no workshops available in this set");
			}
		}
    public Workshop ConvDTOtoDB(WorkshopDTO old)
    {
        Workshop valid = new Workshop();

        valid.WorkshopID     = old.WorkshopID;
        valid.WorkshopName   = old.WorkshopName;
        valid.WorkshopStatus = old.WorkshopStatus;
        return(valid);
    }
Example #3
0
 private void <DoConfigControls> m__1()
 {
     SoundDefOf.Tick_High.PlayOneShotOnCamera(null);
     Find.WindowStack.Add(Dialog_MessageBox.CreateConfirmation("ConfirmContentAuthor".Translate(), delegate
     {
         SoundDefOf.Tick_High.PlayOneShotOnCamera(null);
         Workshop.Upload(this.curScen);
     }, true, null));
 }
Example #4
0
        /* Для редактирования строки акта */
        private void SaveBeforeEdit()
        {
            workshopSaved  = (Workshop)comboBox_Workshop.SelectedItem;
            groupSaved     = (EquipmentGroup)comboBox_GroupEquipment.SelectedItem;
            equipmentSaved = (Equipment)comboBox_Equipment.SelectedItem;
            reasonSaved    = (ReasonDebit)comboBox_ReasonDebit.SelectedItem;

            stateAllSaved = checkBox_AllGroupDebit.Checked;
        }
Example #5
0
        public string CraftPresent(string presentName)
        {
            Workshop workshop = new Workshop();

            IPresent present = this.presents.FindByName(presentName); // намираме подаръка

            ICollection <IDwarf> dwarves = this.dwarfs.Models.Where(dw => dw.Energy >= 50).OrderByDescending(dw => dw.Energy).ToList();

            // намираме тези дуорфи, които имат енергия над 50 и ги подреждаме по нея

            if (!dwarves.Any()) // ако е празна колекцията
            {
                throw new InvalidOperationException(ExceptionMessages.DwarfsNotReady);
            }

            while (dwarves.Any())
            {
                IDwarf currDwarf = dwarves.First();

                workshop.Craft(present, currDwarf);

                if (!currDwarf.Instruments.Any()) // ако му свършат инструментите
                {
                    dwarves.Remove(currDwarf);    //махаме го само от локалната колекция !!!
                }

                if (currDwarf.Energy == 0) //ако му свърши енергията
                {
                    dwarves.Remove(currDwarf);
                    this.dwarfs.Remove(currDwarf); // премахваме го от двете колекции
                }

                if (present.IsDone())
                {
                    break;
                }
            }



            //string result;

            //if (present.IsDone())
            //{
            //    result = string.Format(OutputMessages.PresentIsDone, presentName);
            //}
            //else
            //{
            //    result = string.Format(OutputMessages.PresentIsNotDone, presentName);
            //}

            //return result;

            string result = string.Format(present.IsDone() ? OutputMessages.PresentIsDone : OutputMessages.PresentIsNotDone, presentName);

            return(result);
        }
 private static void Postfix(ItemObject outputItem, Town town, Workshop workshop, int count, bool doNotEffectCapital, int __state)
 {
     if (Campaign.Current.GameStarted && !doNotEffectCapital && BannerlordTweaksSettings.Instance is { } settings&& settings.EnableWorkshopSellTweak)
     {
         float num = Math.Min(1000, __state) * count * (settings.WorkshopSellTweak - 1f);
         workshop.ChangeGold((int)num);
         town.ChangeGold((int)-num);
     }
 }
Example #7
0
        private void GenerateScheme(DropManager dropManager, int lootLevel, Workshop lootWorkshop, Difficulty d, ConcurrentDictionary <string, ServerInventoryItem> newObjects, float remapWeight)
        {
            var moduleTemplate            = resource.ModuleTemplates.RandomModule(lootWorkshop, CommonUtils.RandomEnumValue <ShipModelSlotType>());
            var schemeDropper             = dropManager.GetSchemeDropper(lootWorkshop, lootLevel, remapWeight);
            IInventoryObject schemeObject = schemeDropper.Drop() as IInventoryObject;

            newObjects.TryAdd(schemeObject.Id, new ServerInventoryItem(schemeObject, 1));
            //log.InfoFormat("scheme of level = {0} generated", schemeObject.Level);
        }
    public WorkshopDTO ConvDBtoDTO(Workshop old)
    {
        WorkshopDTO valid = new WorkshopDTO();

        valid.WorkshopID     = old.WorkshopID;
        valid.WorkshopName   = old.WorkshopName;
        valid.WorkshopStatus = old.WorkshopStatus;
        return(valid);
    }
Example #9
0
        public Workshop CreateWorkshop(Workshop workshop)
        {
            var nextId = _workshops.Count == 0 ? 1 : _workshops.Last().Id + 1;

            workshop.Id    = nextId;
            workshop.State = Status.SCHEDULED;
            _workshops.Add(workshop);
            return(workshop);
        }
Example #10
0
    private static Workshop CreateWorkshop()
    {
        Workshop workshop = new Workshop();

        workshop.PossibleProductions = new System.Collections.Generic.List <Workshop.ProductionChain>();
        Workshop.ProductionChain chain1 = new Workshop.ProductionChain()
        {
            Name           = "Iron smelting",
            ProcessingTime = 4.0f
        };
        chain1.Input = new System.Collections.Generic.List <Workshop.Item>();
        chain1.Input.Add(new Workshop.Item()
        {
            ObjectType = "Raw Iron",
            Amount     = 3,
            SlotPosX   = 0,
            SlotPosY   = 0
        });
        chain1.Output = new System.Collections.Generic.List <Workshop.Item>();
        chain1.Output.Add(new Workshop.Item()
        {
            ObjectType = "Steel Plate",
            Amount     = 3,
            SlotPosX   = 2,
            SlotPosY   = 0
        });

        workshop.PossibleProductions.Add(chain1);

        Workshop.ProductionChain chain2 = new Workshop.ProductionChain()
        {
            Name           = "Copper smelting",
            ProcessingTime = 3.0f
        };
        chain2.Input = new System.Collections.Generic.List <Workshop.Item>();
        chain2.Input.Add(new Workshop.Item()
        {
            ObjectType = "Raw Copper",
            Amount     = 3,
            SlotPosX   = 0,
            SlotPosY   = 0
        });
        chain2.Output = new System.Collections.Generic.List <Workshop.Item>();
        chain2.Output.Add(new Workshop.Item()
        {
            ObjectType = "Copper Wire",
            Amount     = 6,
            SlotPosX   = 2,
            SlotPosY   = 0
        });

        workshop.PossibleProductions.Add(chain2);

        workshop.ParamsDefinitions = new Workshop.WorkShopParameterDefinitions();
        return(workshop);
    }
Example #11
0
    void LoadJSON()
    {
        if (dialogues.Count > 0)
        {
            return;
        }

        if (Workshop.ingredients.Count == 0)
        {
            Workshop.LoadJSON();
        }

        for (int part_index = 0, files = json_files.Count; part_index < files; part_index++)
        {
            TextAsset asset = Resources.Load(json_files[part_index]) as TextAsset;
            if (asset == null)
            {
                Debug.LogError("Missing file: " + json_files[part_index]);
                continue;
            }
            else
            {
                Debug.Log("Loading file: " + json_files[part_index]);
            }
            string       json = asset.text;
            DialoguePart part = JsonUtility.FromJson <DialoguePart>(json);

            if (GetListIndex(part.identifier) < 0)
            {
                Debug.LogError(string.Format("Unknown customer identifier: {0} in file {1}", part.identifier, json_files[part_index]));
            }

            if (!dialogues.ContainsKey(part.level))
            {
                dialogues[part.level]     = new List <DialoguePart>();
                usedDialogues[part.level] = new List <bool>();
            }

            dialogues[part.level].Add(part);
            usedDialogues[part.level].Add(false);

            Debug.Log(string.Format("Loaded {0} ({1}) at {2}", part.orderTitle, part.name, part.level));

            string[] invalid = GetInvalidCriteria(part.negativeCriteria);
            if (invalid.Length > 0)
            {
                Debug.LogError("These negative don't exist: " + string.Join(", ", invalid));
            }

            invalid = GetInvalidCriteria(part.positiveCriteria);
            if (invalid.Length > 0)
            {
                Debug.LogError("These positive don't exist: " + string.Join(", ", invalid));
            }
        }
    }
Example #12
0
        public void DeleteWorkshopTest()
        {
            WorkshopBLL target   = new WorkshopBLL();
            Workshop    workshop = new Workshop {
                WorkshopID = 24
            };

            target.DeleteWorkshop(workshop);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
Example #13
0
 public MaterialObject(string id, Workshop workshop, int level, MaterialType materialType, string name, string templateId)
 {
     this.id           = id;
     this.workshop     = workshop;
     this.level        = level;
     this.materialType = materialType;
     this.name         = name;
     this.templateId   = templateId;
     m_IsNew           = true;
 }
Example #14
0
        public int[] AllowedSkills(Workshop workshop, ShipModelSlotType slotType, int level)
        {
            Dictionary <ShipModelSlotType, Dictionary <int, int[]> > filtered = null;

            if (skills.TryGetValue(workshop, out filtered))
            {
                return(AllowedSkills(filtered, slotType, level));
            }
            return(new int[] { });
        }
Example #15
0
 public MaterialObject(string id, Workshop workshop, int level, MaterialData data)
 {
     this.id           = id;
     this.workshop     = workshop;
     this.level        = level;
     this.materialType = data.Type;
     this.name         = data.Name;
     this.templateId   = data.Id;
     m_IsNew           = true;
 }
Example #16
0
        /// <summary>
        /// Return list of modules with given workshop which has any sets
        /// </summary>
        public List <ModuleInfo> ModulesWithSet(Workshop workshop)
        {
            List <ModuleInfo> filteredModules = null;

            if (modules.TryGetValue(workshop, out filteredModules))
            {
                return(filteredModules.Where(m => m.hasSets).ToList());
            }
            return(new List <ModuleInfo>());
        }
Example #17
0
        public void updateWorkshop(Workshop workshopToUpdate)
        {
            var foundWorkshop = workshopList.FirstOrDefault(o => workshopToUpdate.Id == o.Id);

            if (foundWorkshop != null)
            {
                foundWorkshop.Name   = workshopToUpdate.Name;
                foundWorkshop.Status = workshopToUpdate.Status;
            }
        }
Example #18
0
 public ResSetData(string id, string name, int unlockLevel, float dropProb, Workshop workshop, int skill, bool isDefault)
 {
     this.id          = id;
     this.name        = name;
     this.unlockLevel = unlockLevel;
     this.dropProb    = dropProb;
     this.workshop    = workshop;
     this.skill       = skill;
     this.isDefault   = isDefault;
 }
Example #19
0
 public ActionResult Spk(Workshop model)
 {
     if (ModelState.IsValid)
     {
         Context.Workshop dbitem = RepoWorkshop.FindByPK(model.id);
         model.setDbSpk(dbitem);
         RepoWorkshop.save(dbitem, UserPrincipal.id);
     }
     return(RedirectToAction("Index"));
 }
Example #20
0
        public void Load(string xml)
        {
            XDocument document = XDocument.Parse(xml);

            schemes = document.Element("schemes").Elements("scheme").Select(e => {
                Workshop w  = (Workshop)Enum.Parse(typeof(Workshop), e.GetString("workshop"));
                string icon = e.GetString("icon");
                return(new ResSchemeData(w, icon));
            }).ToDictionary(s => s.Workshop, s => s);
        }
Example #21
0
        void WorkshopDetails()
        {
            WorkshopDetailViewModel viewModel = new WorkshopDetailViewModel(SelectedWorkshop);
            WorkshopDetailsView     view      = new WorkshopDetailsView();

            view.DataContext = viewModel;
            view.ShowDialog();
            LoadDatagrid();
            SelectedWorkshop = null;
        }
Example #22
0
        public TableData Query(Workshop entity)
        {
            var result = new TableData();
            var data   = _app.Find(EntityToExpression <Workshop> .GetExpressions(entity));

            GetData(data, result);
            result.count = data.Count();

            return(result);
        }
Example #23
0
 public ModuleSetData(string id, string name, int unlockLevel, float dropProb, bool isDefault, int skillID, Workshop w)
 {
     this.id          = id;
     this.name        = name;
     this.unlockLevel = unlockLevel;
     this.dropProb    = dropProb;
     this.isDefault   = isDefault;
     this.skillID     = skillID;
     this.workshop    = w;
 }
Example #24
0
        public List <ModuleInfo> ModulesWithSet(Workshop workshop, ShipModelSlotType type)
        {
            List <ModuleInfo> filteredModules = null;

            if (modules.TryGetValue(workshop, out filteredModules))
            {
                return(filteredModules.Where(m => m.hasSets && m.Type == type).ToList());
            }
            return(new List <ModuleInfo>());
        }
Example #25
0
        public ModuleInfo Module(Workshop workshop, ShipModelSlotType type, string id)
        {
            List <ModuleInfo> filteredModules = null;

            if (this.modules.TryGetValue(workshop, out filteredModules))
            {
                return(filteredModules.Where(m => m.Id == id && m.Type == type).FirstOrDefault());
            }
            return(null);
        }
Example #26
0
        public ModuleInfo RandomModule(Workshop workshop)
        {
            List <ModuleInfo> filteredModules = null;

            if (this.modules.TryGetValue(workshop, out filteredModules))
            {
                return(filteredModules[Rand.Int(filteredModules.Count - 1)]);
            }
            return(null);
        }
Example #27
0
 public bool SaveWorkshop(Workshop item)
 {
     try
     {
         ctxWrite.Workshops_AddEdit(item.WorkshopID, item.WorkshopName, item.WorkshopEmail, item.WorkshopPhone, item.WorkshopAddress,
                                    item.WorkshopDesc, item.Priority, item.OpeningBalance, item.Active, item.System_Who_Add, item.System_LastAction_IP);
         return(true);
     }
     catch { return(false); }
 }
Example #28
0
        public CEBrothelClanFinanceItemVM(CEBrothel brothel, Workshop workshop, Action <ClanFinanceIncomeItemBaseVM> onSelection, Action onRefresh) : base(workshop, onSelection, onRefresh)
        {
            _brothel = brothel;

            IncomeTypeAsEnum = IncomeTypes.Workshop;
            SettlementComponent component = _brothel.Settlement.GetComponent <SettlementComponent>();

            ImageName = component != null ? component.WaitMeshName : "";
            RefreshValues();
        }
Example #29
0
        public List <Segment> GetSegmentbyWorkshop(Workshop workshop)
        {
            List <Segment> segList = _context.Segment.Include("Workshop").Where(p => p.Workshop.WorkshopID == workshop.WorkshopID).ToList();

            if (segList != null && segList.Count > 0)
            {
                return(segList);
            }
            return(new List <Segment>());
        }
Example #30
0
        public bool Delete(Workshop workshopToDelete)
        {
            var deletedWorkshop = context.Remove(workshopToDelete).Entity;

            if (deletedWorkshop != null)
            {
                return(true);
            }
            return(false);
        }
Example #31
0
 /// <summary>
 /// Maps workshop entity to workshop DTO entity
 /// </summary>
 /// <param name="workshop">Workshop entity</param>
 /// <returns>Workshop DTO entity</returns>
 public static WorkshopDto ToWorkshopDto(this Workshop workshop)
 {
     return(new WorkshopDto()
     {
         Id = workshop.Id,
         ModuleId = workshop.ModuleId,
         DateTime = workshop.DateTime,
         Location = workshop.Location
     });
 }
Example #32
0
        public void update(Workshop workshop)
        {
            workshopNameLabel.Text = workshop.Topic;
            dateLabel.Text = workshop.StartDate.ToShortDateString();
            dayLabel.Text = workshop.StartDate.DayOfWeek.ToString ();
            timeLabel.Text = workshop.StartDate.ToShortTimeString() + " - " + workshop.EndDate.ToShortTimeString();
            int i = workshop.Maximum - workshop.BookingCount;
            double x = (double) (workshop.Maximum - workshop.BookingCount) / workshop.Maximum;
            if (x == 0) { // Red
                colorBG.BackgroundColor = UIColor.FromRGB (238,64,53);
            } else if (x < 0.1) { // Orange
                colorBG.BackgroundColor = UIColor.FromRGB (255,112,0);
            } else if (x < 0.4){ // more orange
                colorBG.BackgroundColor = UIColor.FromRGB (243,119,54);
            } else if (x < 0.7){ // Yellow
                colorBG.BackgroundColor = UIColor.FromRGB (253,244,152);
            } else { // Green
                colorBG.BackgroundColor = UIColor.FromRGB (123,192,67);
            }

            placesAvailableLabel.Text = ""+i;
        }
 public void BookWorkShop(Workshop shop)
 {
     Debug.WriteLine ("Request to book workshop : ID = " + shop.WorkshopId);
     shop.Book ();
 }
 public void CancelWorkShop(Workshop shop)
 {
     Debug.WriteLine ("Request to cancel workshop : ID = " + shop.WorkshopId);
     shop.Cancel ();
 }
 public WorkshopController(Workshop session)
     : base(new WorkshopPage(), session)
 {
     session.ErrorMessage = "";
 }
 public void WaitingWorkShop(Workshop shop)
 {
     Debug.WriteLine ("Request to waiting workshop : ID = " + shop.WorkshopId);
     shop.AddToWaitingList ();
 }
Example #37
0
        /// <summary>
        /// Creates a new card based on how many cards have already been made.
        /// </summary>
        /// <param name="card">
        /// The name of the card to be created.
        /// </param>
        /// <returns>
        /// The new created card.
        /// </returns>
        public static Card CreateCard(CardName card)
        {
            Contract.Requires(card != CardName.Backside & card != CardName.Empty);

            Contract.Ensures(Contract.Result<Card>().Name == card);

            Card c;
            switch (card)
            {
                case CardName.Copper:
                    c = new Copper();
                    break;
                case CardName.Silver:
                    c = new Silver();
                    break;
                case CardName.Gold:
                    c = new Gold();
                    break;
                case CardName.Curse:
                    c = new Curse();
                    break;
                case CardName.Estate:
                    c = new Estate();
                    break;
                case CardName.Duchy:
                    c = new Duchy();
                    break;
                case CardName.Province:
                    c = new Province();
                    break;
                case CardName.Gardens:
                    c = new Gardens();
                    break;
                case CardName.Cellar:
                    c = new Cellar();
                    break;
                case CardName.Chapel:
                    c = new Chapel();
                    break;
                case CardName.Chancellor:
                    c = new Chancellor();
                    break;
                case CardName.Village:
                    c = new Village();
                    break;
                case CardName.Woodcutter:
                    c = new Woodcutter();
                    break;
                case CardName.Workshop:
                    c = new Workshop();
                    break;
                case CardName.Feast:
                    c = new Feast();
                    break;
                case CardName.Moneylender:
                    c = new Moneylender();
                    break;
                case CardName.Remodel:
                    c = new Remodel();
                    break;
                case CardName.Smithy:
                    c = new Smithy();
                    break;
                case CardName.ThroneRoom:
                    c = new ThroneRoom();
                    break;
                case CardName.CouncilRoom:
                    c = new CouncilRoom();
                    break;
                case CardName.Festival:
                    c = new Festival();
                    break;
                case CardName.Laboratory:
                    c = new Laboratory();
                    break;
                case CardName.Library:
                    c = new Library();
                    break;
                case CardName.Market:
                    c = new Market();
                    break;
                case CardName.Mine:
                    c = new Mine();
                    break;
                case CardName.Adventurer:
                    c = new Adventurer();
                    break;
                case CardName.Bureaucrat:
                    c = new Bureaucrat();
                    break;
                case CardName.Militia:
                    c = new Militia();
                    break;
                case CardName.Spy:
                    c = new Spy();
                    break;
                case CardName.Thief:
                    c = new Thief();
                    break;
                case CardName.Witch:
                    c = new Witch();
                    break;
                case CardName.Moat:
                    c = new Moat();
                    break;
                default:
                    throw new NotImplementedException("Tried to create a card that was not implemented when CardFactory was last updated.");
            }

            c.Initialize(card, CardsMade[card]);
            CardsMade[card] += 1;
            createdCards.Add(c, true);
            return c;
        }
Example #38
0
        public Workshop ToWorkShop()
        {
            Workshop w = new Workshop ();

            w.WorkshopId = workshopID;
            w.topic = topic;
            w.description = description;
            w.targetingGroup = targetingGroup;
            w.campus = campusID;
            w.StartDate = starting;
            w.EndDate = ending;
            w.maximum = maximum;
            w.WorkShopSetID = WorkShopSetID;
            w.cutoff = cutoff;
            w.type = type;
            w.reminder_num = reminder_num;
            w.reminder_sent = reminder_sent;
            w.BookingStatus = BookingStatuses.Booked;

            w.HelpsData = HelpsData;

            return w;
        }
Example #39
0
    public static List<Workshop> GetWorkshops()
    {
        List<Workshop> ds = new List<Workshop>();
        try
        {
            DbCommand dbcmd = mDatabase.GetStoredProcCommand("uspGetWorkshops");
            using (IDataReader reader = mDatabase.ExecuteReader(dbcmd))
            {
                while (reader.Read())
                {
                    //iUserID	vcWindowsLogin	vcFirstName	vcLastName	vcEmail
                    Workshop i = new Workshop();
                    i.IWorkshopID = reader["iWorkshopID"] == DBNull.Value ? -1 : (int)reader["iWorkshopID"];
                    i.IRequesterID = reader["iRequesterID"] == DBNull.Value ? -1 : (int)reader["iRequesterID"];
                    i.VcFirstName = reader["vcFirstName"] == DBNull.Value ? "" : (string)reader["vcFirstName"];
                    i.VcItemDescription = reader["vcItemDescription"] == DBNull.Value ? "" : (string)reader["vcItemDescription"];
                    i.VcCRPRTDR = reader["vcCRPRTDR"] == DBNull.Value ? "" : (string)reader["vcCRPRTDR"];
                    i.IITemID = reader["iITemID"] == DBNull.Value ? -1 : (int)reader["iITemID"];
                    string strDate = reader["sdtDate"] == DBNull.Value ? "" : reader["sdtDate"].ToString();
                    //                    i.SdtDate = strDate == "" ? new DateTime(1900, 1, 1) :  (DateTime)reader["sdtDate"];
                    i.SdtDate = reader["SdtDate"] == DBNull.Value ? "" : (string)reader["SdtDate"];
                    i.SiWorkshopStatusID = reader["siWorkshopStatusID"] == DBNull.Value ? Convert.ToInt16(-1) : (Int16)reader["siWorkshopStatusID"];
                    i.VcWorkshopStatus = reader["vcWorkshopStatus"] == DBNull.Value ? "" : (string)reader["vcWorkshopStatus"];
                    ds.Add(i);

                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
        return ds;
    }
Example #40
0
 public static Workshop GetWorkshopByID(int WorkshopID)
 {
     Workshop w = null;
     try
     {
         DbCommand dbcmd = mDatabase.GetStoredProcCommand("uspGetWorkshopByID");
         mDatabase.AddInParameter(dbcmd, "@iWorkshopID", DbType.Int32, WorkshopID);
         using (IDataReader reader = mDatabase.ExecuteReader(dbcmd))
         {
             if (reader.Read())
             {
                 //iUserID	vcWindowsLogin	vcFirstName	vcLastName	vcEmail
                 w = new Workshop();
                 w.IWorkshopID = reader["iWorkshopID"] == DBNull.Value ? -1 : (int)reader["iWorkshopID"];
                 w.IRequesterID = reader["iRequesterID"] == DBNull.Value ? -1 : (int)reader["iRequesterID"];
                 w.VcFirstName = reader["vcFirstName"] == DBNull.Value ? "" : (string)reader["vcFirstName"];
                 w.VcItemDescription = reader["vcItemDescription"] == DBNull.Value ? "" : (string)reader["vcItemDescription"];
                 w.VcCRPRTDR = reader["vcCRPRTDR"] == DBNull.Value ? "" : (string)reader["vcCRPRTDR"];
                 w.IITemID = reader["iITemID"] == DBNull.Value ? -1 : (int)reader["iITemID"];
                 string strDate = reader["sdtDate"] == DBNull.Value ? "" : reader["sdtDate"].ToString();
                 w.SdtDate = reader["SdtDate"] == DBNull.Value ? "" : (string)reader["SdtDate"];
                 w.SiWorkshopStatusID = reader["siWorkshopStatusID"] == DBNull.Value ? Convert.ToInt16(-1) : (Int16)reader["siWorkshopStatusID"];
                 w.VcWorkshopStatus = reader["vcWorkshopStatus"] == DBNull.Value ? "" : (string)reader["vcWorkshopStatus"];
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return w;
 }
 public void ShowSelectedWorkshop(Workshop workshop)
 {
     //View.Navigation.PushAsync(new SessionsController(workShop.WorkShopSessions).View);
     View.Navigation.PushAsync(new WorkshopController(workshop).View);
 }
 public static Workshop CreateWorkshop(int workshopID, string name)
 {
     Workshop workshop = new Workshop();
     workshop.WorkshopID = workshopID;
     workshop.Name = name;
     return workshop;
 }
Example #43
0
		public void ShowSectionsInSessions(Workshop session)
		{
			//View.Navigation.PushAsync(new SessionsController(workShop.WorkShopSessions).View);
			View.Navigation.PopModalAsync(true);
			parentView.Navigation.PushAsync(new WorkshopController(session).View);
		}
 public void AddToWorkshops(Workshop workshop)
 {
     base.AddObject("Workshops", workshop);
 }
Example #45
0
 internal override void ShowCard(string s,int x,int y)
 {
     PlayCard a = new PlayCard();
     switch (s)
     {
         case "銅貨":
             a = new Cooper(ShowField, ShowHand, this);
             break;
         case "銀貨":
             a = new Silver(ShowField, ShowHand, this);
             break;
         case "金貨":
             a = new Gold(ShowField, ShowHand, this);
             break;
         case "屋敷":
             a = new Mansion(ShowField, ShowHand, this);
             break;
         case "公領":
             a = new Landtag(ShowField, ShowHand, this);
             break;
         case "属州":
             a = new Province(ShowField, ShowHand, this);
             break;
         case "地下貯蔵庫":
             a = new UndergroundRepository(ShowField, ShowHand, this);
             break;
         case "市場":
             a = new Market(this);
             break;
         case "民兵":
             a = new Militia(ShowField, ShowHand, this);
             break;
         case "鉱山":
             a = new Mine(ShowField, ShowHand, this);
             break;
         case "堀":
             a = new Moat(this);
             break;
         case "鍛冶屋":
             a = new Smithy(this);
             break;
         case "村":
             a = new Village(this);
             break;
         case "木こり":
             a = new Woodcutter(this);
             break;
         case "改築":
             a = new Remodel(this);
             break;
         case "工房":
             a = new Workshop(this);
             break;
     }
     a.Location = new System.Drawing.Point(x,y);
     a.Size = new System.Drawing.Size(70, 110);
     a.Name = s;
     a.SizeMode = PictureBoxSizeMode.StretchImage;
     a.Image = global::dominion.Properties.Resources.back;
     form1.Controls.Add(a);
     a.BringToFront();
     ShowHand.Add(a);
     a.ChangePointPara(880 + 20 * ShowHand.Count, 10 + 120 * num);
     for (int i = 0; i < ShowHand.Count; i++)
     {
         ShowHand[i].Refresh();
     }
     ShowDeck.Refresh();
 }