Ejemplo n.º 1
0
        private string GetRoomTypeFlaggedList(roomItem roomItem)
        {
            List <string>            names = new List <string>();
            Dictionary <int, string> dictionary;

            switch (roomItem)
            {
            case roomItem.roomType:
                dictionary = Enum.GetValues(typeof(roomType)).Cast <roomType>().ToDictionary(t => (int)t, t => t.ToString());
                int i = 0;
                foreach (int key in dictionary.Keys)
                {
                    string name = dictionary[key];
                    if (roomEdits.roomType.HasFlag((roomType)key))
                    {
                        if (dictionary.Count > 1 && i == 0)
                        {
                            i++;
                            continue;
                        }
                        names.Add(name);
                    }
                    i++;
                }
                break;

            case roomItem.roomLimits:
                break;

            case roomItem.roomTraits:
                break;
            }
            return(Functions.FormatStringArray(names.ToArray()));
        }
Ejemplo n.º 2
0
 private void PressCheckBox(roomItem item)
 {
     foreach (CheckBox control in roomCheckBoxList)
     {
         if (((roomItem)control.Tag) == item)
         {
             control.Checked = true;
         }
         else
         {
             control.Checked = false;
         }
     }
 }
Ejemplo n.º 3
0
 private void PressCheckBox(roomItem item)
 {
     foreach (CheckBox control in roomCheckBoxList) {
         if (((roomItem)control.Tag) == item)
             control.Checked = true;
         else
             control.Checked = false;
     }
 }
Ejemplo n.º 4
0
 private string GetRoomTypeFlaggedList(roomItem roomItem)
 {
     List<string> names = new List<string>();
     Dictionary<int, string> dictionary;
     switch (roomItem) {
         case roomItem.roomType:
             dictionary = Enum.GetValues(typeof(roomType)).Cast<roomType>().ToDictionary(t => (int)t, t => t.ToString());
             int i = 0;
             foreach (int key in dictionary.Keys) {
                 string name = dictionary[key];
                 if (roomEdits.roomType.HasFlag((roomType)key)) {
                     if (dictionary.Count > 1 && i == 0) {
                         i++;
                         continue;
                     }
                     names.Add(name);
                 }
                 i++;
             }
             break;
         case roomItem.roomLimits:
             break;
         case roomItem.roomTraits:
             break;
     }
     return Functions.FormatStringArray(names.ToArray());
 }