Пример #1
0
        public bool Init(byte[] buffer)
        {
            int n = GetByte(buffer, _start);

            for (var i = 1; i <= n; i++)
            {
                Separators.Add((char)GetByte(buffer, _start + i));
            }

            // length
            var dl = GetByte(buffer, _start + n + 1);
            // count
            var dc = GetWord(buffer, _start + n + 2);
            // entry start
            var ds = _start + n + 4;

            Entries = new List <Entry>();

            // loop through all entries
            for (var j = 0; j < dc; j++)
            {
                var addr = (j * dl) + ds;
                var text = new Text(GetWord(buffer, addr));
                text.AddCharacters(GetWord(buffer, addr + 2));
                Entries.Add(new Entry(j, addr, text.GetValue(), text));
            }

            return(true);
        }
Пример #2
0
 /// <summary>
 /// Add a list of separators.
 /// </summary>
 /// <param name="list"></param>
 public void AddListOfSeparators(List <char> listSeparator)
 {
     foreach (char item in listSeparator)
     {
         Separators.Add(item);
     }
 }
Пример #3
0
 public GridTokenEditControl()
 {
     EditTextBox.KeyPress += EditTextBoxOnKeyPress;
     Separators.Add(";");
     ValidateToken         += OnValidateToken;
     SelectedTokensChanged += OnSelectedTokensChanged;
 }
Пример #4
0
            protected override void OnInit(InitArgs e)
            {
                DateTime start = new DateTime(2015, 1, 1, 12, 0, 0);
                DateTime end   = new DateTime(2016, 1, 1, 12, 0, 0);

                Timeline = new TimeCellCollection();
                for (DateTime cell = start; cell < end; cell = cell.AddDays(1))
                {
                    Timeline.Add(cell, cell.AddDays(1));
                }

                LoadRoomsAndReservations();
                ScrollTo(DateTime.Today.AddDays(-1));
                Separators.Add(DateTime.Now, Color.Red);
                UpdateWithMessage("Welcome!", CallBackUpdateType.Full);
            }
Пример #5
0
            private void LoadInit(int changeDate = 0)
            {
                DateTime start = DateTime.Now.AddDays(-3);
                DateTime end   = DateTime.Now.AddDays(3);

                Timeline = new TimeCellCollection();
                for (DateTime cell = start; cell < end; cell = cell.AddDays(1))
                {
                    // Timeline.Add(cell, cell.AddDays(1));
                }

                Timeline.Add(DateTime.Now, DateTime.Now.AddDays(1));

                LoadRoomsAndReservations();
                ScrollTo(DateTime.Today.AddDays(-1));
                Separators.Add(changeDate == 0 ? DateTime.Now.AddDays(1) : dateChange, Color.Red);

                UpdateWithMessage("Welcome!", CallBackUpdateType.Full);
            }
Пример #6
0
 public void AddSeparator(Separator separator)
 {
     Separators.Add(separator);
 }