Example #1
0
 protected virtual void OnUpdate(UpdateLayer update)
 {
     if (!supressUpdate)
     {
         OnUpdate(new UpdateImage(update, this, update.Update, update.RectangleUpdate));
     }
 }
Example #2
0
        UpdateLayer GetUpdateLayer(int layer)
        {
            UpdateLayer updateLayer;

            if (!updateLayers.TryGetValue(layer, out updateLayer))
            {
                updateLayer         = new UpdateLayer(layer);
                updateLayers[layer] = updateLayer;
            }
            return(updateLayer);
        }
        /// <summary>
        /// check result data after 'Update'
        /// </summary>
        /// <param name="updateItem"></param>
        /// <returns></returns>
        private TypePlace CheckAfterUpdate(TypePlace updateItem)
        {
            UpdateLayer dictDelegat = new UpdateLayer(_layer.Update);
            TypePlace   result      = dictDelegat(typePlaceData);

            if (result == null)
            {
                MessageShow.ShowError(UpdateMess);
                //select first element of grid by default
                result = TypePlaceList[0];
            }
            return(result);
        }
        /// <summary>
        /// check result data after 'Update'
        /// </summary>
        /// <param name="updateItem"></param>
        /// <returns></returns>
        private SystemConstant CheckAfterUpdate(SystemConstant updateItem)
        {
            UpdateLayer    dictDelegat = new UpdateLayer(_layer.Update);
            SystemConstant result      = dictDelegat(systemConstantData);

            if (result == null)
            {
                MessageBox.Show(UpdateMess);
                //select first element of grid by default
                result = SystemConstantList[0];
            }
            return(result);
        }
        /// <summary>
        /// check result data after 'Update'
        /// </summary>
        /// <param name="updateItem"></param>
        /// <returns></returns>
        private KlR030 CheckAfterUpdate(KlR030 updateItem)
        {
            UpdateLayer dictDelegat = new UpdateLayer(_layer.Update);
            KlR030      result      = dictDelegat(klr030Data);

            if (result == null)
            {
                MessageShow.ShowError(UpdateMess);
                //select first element of grid by default
                result = Klr030List[0];
            }
            return(result);
        }
Example #6
0
        private void BuscarAtualizações()
        {
            try {
                string versaoAtual     = "_2.0";
                string proxVersao      = "_2.1";
                string proxAtualização = Title.Replace(versaoAtual, proxVersao);

                if (UpdateLayer.TemNovaAtualização(proxAtualização))
                {
                    UpdateLayer.BaixarAtualização(proxAtualização);
                    MessageBox.Show(
                        $"Atualização baixada com sucesso para sua pasta de Downloads!\n" +
                        $"C:\\Users\\{Environment.UserName}\\Downloads\\{proxAtualização}\n" +
                        $"Descompacte e substitua na pasta antiga da Timesheet!\n"
                        );
                }
            }
            catch (Exception e) {
                MessageBox.Show($"Houve um erro ao buscar a nova atualização!\n{e.Message}\n");
            }
        }
Example #7
0
 public UpdateImage(UpdateLayer singleLayerUpdate, IMatrixImage image, Update update, (int x, int y, int width, int height)?rectangleUpdate)
Example #8
0
 public async Task Handle(UpdateLayer command)
 {
     await command.Layer.Update(command.Envelope);
 }
Example #9
0
 protected void OnUpdate(object _, UpdateLayer update) => OnUpdate(update);