Ejemplo n.º 1
0
 // Устанавливает тип поля
 public void SetFieldType(type_field field_type)
 {
     this.field_type = field_type;
     if (field_type == type_field.user_field)
     {
         Utilits.UnitEvent += Processing_Unit;
     }
 }
Ejemplo n.º 2
0
 public void Clear()
 {
     Initinitialization_Grid(Unit.Get_Size_Unit());                              //Проводим ""расчерчивание поля
     Initinitialization_Field(Unit.Get_Size_Unit(), MyCanvas_MouseLeftButtonUp); //Проводим инициализацию поля
     if (mode_game == game_mode.offline_game)                                    //Если офлайн режим
     {
         comp_ii = new Computer();
     }
     field_type     = type_field.set_field;
     grid.IsEnabled = true; // Блокируем поле, т.к. все уже выставлено и оно больше не будет изменяться игроком
 }
Ejemplo n.º 3
0
 public void EditRegister(string mais, string lsb, string msb, type_field t, fpga_field r, string init, string comment, string group)
 {
     MAIS    = Int32.Parse(mais);
     LSB     = Int32.Parse(lsb);
     MSB     = Int32.Parse(msb);
     Type    = t;
     FPGA    = r;
     Init    = init;
     Comment = comment;
     Group   = group;
 }
Ejemplo n.º 4
0
 public static bool IsValidType(string Type)
 {
     try
     {
         type_field t = (type_field)Enum.Parse(typeof(type_field), Type, true);
     }
     catch (ArgumentException)
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 5
0
 public UserControl1()
 {
     InitializeComponent();
     window.Width  = Unit.Get_Size_Unit() * 10;                                  //Устанавливаем размер поля шириной равной 10 ячейкам
     window.Height = Unit.Get_Size_Unit() * 10;                                  //Устанавливаем размер поля высотой равной 10 ячейкам
     Initinitialization_Grid(Unit.Get_Size_Unit());                              //Проводим ""расчерчивание поля
     Initinitialization_Field(Unit.Get_Size_Unit(), MyCanvas_MouseLeftButtonUp); //Проводим инициализацию поля
     if (mode_game == game_mode.offline_game)                                    //Если офлайн режим
     {
         comp_ii = new Computer();
     }
     field_type = type_field.set_field;
 }
Ejemplo n.º 6
0
 public RegisterEntry(string Name, int Address, int MAIS, int LSB, int MSB,
                      type_field Type, fpga_field FPGA, string Init, string Comment, string Group)
 {
     this.Name      = Name;
     this.Address   = Address;
     this.MAIS      = MAIS;
     this.LSB       = LSB;
     this.MSB       = MSB;
     this.Type      = Type;
     this.FPGA      = FPGA;
     this.Init      = Init;
     this.Comment   = Comment;
     this.Group     = Group;
     Fields         = new List <RegisterEntry>();
     IsValid        = true;
     IsComment      = false;
     Reason         = "";
     Index          = -1;
     SecondaryIndex = -1;
 }
Ejemplo n.º 7
0
        static public HR.Models.user.notifications check_alert(string screen_name, HR.Models.user.Action action, type_field type_field)
        {
            ApplicationDbContext dbcontext = new ApplicationDbContext();
            var C = dbcontext.notifications.FirstOrDefault(m => m.Form == screen_name && m.Action == action && m.type_field == type_field);

            if (C != null)
            {
                return(C);
            }
            else
            {
                return(null);
            }
        }
Ejemplo n.º 8
0
 public void SetRegType(type_field Type)
 {
     this.Type = Type;
 }