Exemple #1
0
        public void BuildView()
        {
            Title = AppResources.Servicio;

            Content = new StackLayout
            {
                Padding  = 5,
                Children =
                {
                    new StackLayout
                    {
                        Children =
                        {
                            new Label
                            {
                                Style = CustomStyles.DefaultLabels(),
                                Text  = AppResources.Fecha
                            },
                            _fechaDatePicker
                        }
                    },
                    new Label
                    {
                        Style = CustomStyles.DefaultLabels(),
                        Text  = AppResources.Descripcion
                    },
                    _descripcionEditor
                }
            };
        }
Exemple #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            ApplicationManager.CrashReportEnabled = true;
            ImageConverterManager.AddConverter(new DefaultImageConverter());
            Configuration.SetImageRendering(Resources);

            Resources.MergedDictionaries.Add(new ResourceDictionary {
                Source = new Uri("pack://application:,,,/" + Assembly.GetEntryAssembly().GetName().Name.Replace(" ", "%20") + ";component/WPF/Styles/GRFEditorStyles.xaml", UriKind.RelativeOrAbsolute)
            });

            if (!Methods.IsWinVistaOrHigher() && Methods.IsWinXPOrHigher())
            {
                // We are on Windows XP, force the style.
                try {
                    Uri uri = new Uri("PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component\\themes/aero.normalcolor.xaml", UriKind.Relative);
                    Resources.MergedDictionaries.Add(LoadComponent(uri) as ResourceDictionary);
                }
                catch { }
            }

            if (!CustomStyles.StyleSet)
            {
                CustomStyles.SetDefault();
            }

            base.OnStartup(e);
        }
        public void InitControls()
        {
            _fechaLabel = new Label()
            {
                Style = CustomStyles.ResumenDatosLabels()
            };

            _descripcionLabel = new Label
            {
                Style = CustomStyles.ResumenDatosLabels()
            };

            _lugarLabel = new Label
            {
                Style = CustomStyles.ResumenDatosLabels()
            };

            _agenteLabel = new Label()
            {
                Style = CustomStyles.ResumenDatosLabels()
            };

            _personaLabel = new Label()
            {
                Style = CustomStyles.ResumenDatosLabels()
            };
        }
        public void InitControls()
        {
            _direccionLabel = new Label
            {
                Text  = AppResources.Direccion,
                Style = CustomStyles.DefaultLabels()
            };

            _calleBindablePicker = new BindablePicker
            {
                Title             = AppResources.SeleccionaCalle,
                DisplayMemberPath = nameof(Calle.Valor),
                SelectedValuePath = nameof(Calle.Valor),
            };

            _numeroLabel = new Label
            {
                Text  = AppResources.IntroducirNumero,
                Style = CustomStyles.DefaultLabels()
            };

            _numeroEntry = new Entry
            {
                Keyboard = Keyboard.Numeric
            };
        }
Exemple #5
0
        private Document CreateReport(ReportData data)
        {
            var doc = new Document();

            CustomStyles.Define(doc);
            doc.Add(CreateMainSection(data));
            return(doc);
        }
        /// <summary>
        /// Get a gui StyleAdapter by name.
        ///
        /// 1. looks in styles added by SetStyle()
        /// 2. looks in the SkinAdapter
        /// 3. if not found returns null
        /// </summary>
        /// <param name="name">the StyleAdapter name</param>
        /// <returns>The StyleAdapter if found or null</returns>
        protected IStyle GetStyleByName(string name)
        {
            // first look into the custom styles
            IStyle style;

            if (CustomStyles.TryGetValue(name, out style))
            {
                return(style);
            }

            return(GuiSkin.FindStyle(name).ToStyle());
        }
Exemple #7
0
        public void InitControls()
        {
            _tipLabel = new Label
            {
                Text  = AppResources.IntroducirTip,
                Style = CustomStyles.DefaultLabels()
            };

            _tipEntry = new Entry
            {
                Keyboard = Keyboard.Numeric
            };
        }
        public void InitControls()
        {
            _datosPersonaLabel = new Label
            {
                Text  = AppResources.IntroducirPersona,
                Style = CustomStyles.DefaultLabels()
            };

            _dniEntry = new Entry
            {
                Placeholder = AppResources.IntroducirDni
            };
        }
Exemple #9
0
        public Document GetDocument(string title)
        {
            Document document = new Document()
            {
                Info =
                {
                    Title = title
                }
            };

            CustomStyles.Definiere(document);
            return(document);
        }
        public static void SetStyles()
        {
            CustomStyles.SetStandart();
            AddFilesStyle                  = new ButtonStyle();
            AddFilesStyle.FontSize         = 24;
            AddFilesStyle.Border_Thickness = 1;

            AddFilesStyle.Normal = new SolidColorBrush(Color.FromRgb(198, 198, 198));
            AddFilesStyle.Hover  = new SolidColorBrush(Color.FromRgb(150, 150, 150));
            AddFilesStyle.Active = new SolidColorBrush(Color.FromRgb(25, 42, 39));

            AddFilesStyle.Text_Normal = Brushes.Black;
            AddFilesStyle.Text_Hover  = Brushes.Black;
            AddFilesStyle.Text_Active = new SolidColorBrush(Color.FromRgb(185, 209, 168));

            AddFilesStyle.Border_Normal = new SolidColorBrush(Color.FromRgb(70, 70, 70));
            AddFilesStyle.Border_Hover  = new SolidColorBrush(Color.FromRgb(70, 70, 70));
            AddFilesStyle.Border_Active = new SolidColorBrush(Color.FromRgb(90, 90, 90));

            AddDirStyle                  = new ButtonStyle();
            AddDirStyle.FontSize         = 24;
            AddDirStyle.Border_Thickness = 1;

            AddDirStyle.Normal = new SolidColorBrush(Color.FromRgb(221, 221, 221));
            AddDirStyle.Hover  = new SolidColorBrush(Color.FromRgb(130, 161, 108));
            AddDirStyle.Active = new SolidColorBrush(Color.FromRgb(41, 31, 55));

            AddDirStyle.Text_Normal = Brushes.Black;
            AddDirStyle.Text_Hover  = Brushes.Black;
            AddDirStyle.Text_Active = new SolidColorBrush(Color.FromRgb(178, 174, 165));

            AddDirStyle.Border_Normal = new SolidColorBrush(Color.FromRgb(70, 70, 70));
            AddDirStyle.Border_Hover  = new SolidColorBrush(Color.FromRgb(70, 70, 70));
            AddDirStyle.Border_Active = new SolidColorBrush(Color.FromRgb(90, 90, 90));

            ClearListStyle                  = new ButtonStyle();
            ClearListStyle.FontSize         = 14;
            ClearListStyle.Border_Thickness = 1;

            ClearListStyle.Hover  = new SolidColorBrush(Color.FromRgb(77, 57, 57));
            ClearListStyle.Normal = new SolidColorBrush(Color.FromRgb(147, 2, 2));
            ClearListStyle.Active = new SolidColorBrush(Color.FromRgb(30, 0, 35));

            ClearListStyle.Text_Hover  = new SolidColorBrush(Color.FromRgb(217, 201, 201));
            ClearListStyle.Text_Normal = new SolidColorBrush(Color.FromRgb(217, 201, 201));
            ClearListStyle.Text_Active = new SolidColorBrush(Color.FromRgb(217, 201, 201));

            ClearListStyle.Border_Hover  = new SolidColorBrush(Color.FromRgb(189, 189, 189));
            ClearListStyle.Border_Normal = Brushes.Black;
            ClearListStyle.Border_Active = Brushes.White;
        }
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        EditorGUILayout.PropertyField(_editor.resolution);
        EditorGUILayout.PropertyField(_editor.color);
        EditorGUILayout.PropertyField(_editor.close);

        BezierEditor.display = CustomStyles.DrawToggle(BezierEditor.header,
                                                       BezierEditor.display,
                                                       BuiltinStyle.toggleModule);
        if (BezierEditor.display)
        {
            _editor.orderList.DoLayoutList();
        }

        if (GUI.changed)
        {
            serializedObject.ApplyModifiedProperties();
            EditorUtility.SetDirty(_editor.curve);
            Repaint();
        }
    }
        public void InitControls()
        {
            _matriculaLabel = new Label
            {
                Text  = AppResources.IntroducirMatricula,
                Style = CustomStyles.DefaultLabels()
            };
            _matriculaEntry = new Entry
            {
                Placeholder = AppResources.EjemploMatricula
            };

            _personaLabel = new Label
            {
                Text  = AppResources.IntroducirPersona,
                Style = CustomStyles.DefaultLabels()
            };

            _dniEntry = new Entry
            {
                Placeholder = AppResources.IntroducirDni
            };
        }
    public override void OnGUI(Rect position,
                               SerializedProperty property,
                               GUIContent label)
    {
        position.height = EditorGUIUtility.singleLineHeight;

        EditorGUI.PropertyField(position, property);
        if (property.objectReferenceValue == null)
        {
            return;
        }

        PropertySetup(property);
        _object.Update();

        position.y += CustomStyles.lineHeight;
        EditorGUI.PropertyField(position, _editor.resolution);

        position.y += CustomStyles.lineHeight;
        EditorGUI.PropertyField(position, _editor.color);

        position.y += CustomStyles.lineHeight;
        EditorGUI.PropertyField(position, _editor.close);

        BezierEditor.display = CustomStyles.DrawToggle(BezierEditor.header,
                                                       BezierEditor.display,
                                                       BuiltinStyle.toggleModule);
        if (BezierEditor.display)
        {
            _editor.orderList.DoLayoutList();
        }

        if (GUI.changed)
        {
            _object.ApplyModifiedProperties();
        }
    }
        public void BuildView()
        {
            Title = AppResources.Resumen;

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Children =
                    {
                        new StackLayout
                        {
                            Children =
                            {
                                new Label
                                {
                                    Style = CustomStyles.DefaultLabels(),
                                    Text  = AppResources.Fecha
                                },
                                _fechaLabel
                            }
                        },
                        new Label
                        {
                            Style = CustomStyles.DefaultLabels(),
                            Text  = AppResources.Descripcion
                        },
                        _descripcionLabel,
                        new StackLayout
                        {
                            Children =
                            {
                                new Label
                                {
                                    Text  = AppResources.Direccion,
                                    Style = CustomStyles.DefaultLabels()
                                },
                                _lugarLabel
                            }
                        },
                        new StackLayout
                        {
                            Children =
                            {
                                new Label
                                {
                                    Text  = AppResources.Agente,
                                    Style = CustomStyles.DefaultLabels()
                                },
                                _agenteLabel
                            }
                        },
                        new StackLayout
                        {
                            Children =
                            {
                                new Label
                                {
                                    Text  = AppResources.Persona,
                                    Style = CustomStyles.DefaultLabels()
                                },
                                _personaLabel
                            }
                        },
                    }
                }
            };
        }