protected override void OnInitializeView(DataFormItem dataFormItem, Entry view)
 {
     base.OnInitializeView(dataFormItem, view);
     view.Keyboard = Keyboard.Numeric;
     this.OnUpdateValue(dataFormItem, view);
     this.OnUpdateReadOnly(dataFormItem, view);
 }
Ejemplo n.º 2
0
 private void ChangeItemOrder(DataFormItem dataFormItem)
 {
     if (dataFormItem.Name == "ContactNumber")
     {
         dataFormItem.Order = App.Current.MainPage.FlowDirection != FlowDirection.RightToLeft ? 4 : 5;
     }
     if (dataFormItem.Name == "ContactType")
     {
         dataFormItem.Order = App.Current.MainPage.FlowDirection != FlowDirection.RightToLeft ? 5 : 4;
     }
     if (dataFormItem.Name == "Email")
     {
         dataFormItem.Order = App.Current.MainPage.FlowDirection != FlowDirection.RightToLeft ? 6 : 7;
     }
     if (dataFormItem.Name == "EmailType")
     {
         dataFormItem.Order = App.Current.MainPage.FlowDirection != FlowDirection.RightToLeft ? 7 : 6;
     }
     if (dataFormItem.Name == "Address")
     {
         dataFormItem.Order = App.Current.MainPage.FlowDirection != FlowDirection.RightToLeft ? 8 : 9;
     }
     if (dataFormItem.Name == "AddressTypes")
     {
         dataFormItem.Order = App.Current.MainPage.FlowDirection != FlowDirection.RightToLeft ? 9 : 8;
     }
 }
        protected override View GenerateViewForLabel(DataFormItem dataFormItem)
        {
            var view = base.GenerateViewForLabel(dataFormItem);

            view.Touch += OnLabelTouch;
            return(view);
        }
 protected override void OnEditorCreated(DataFormItem dataFormItem, View editor)
 {
     base.OnEditorCreated(dataFormItem, editor);
     editor.Enabled   = true;
     editor.Focusable = false;
     editor.Touch    += OnEditorTouch;
 }
 protected override void OnInitializeView(DataFormItem dataFormItem, Editor view)
 {
     base.OnInitializeView(dataFormItem, view);
     dataFormItem.UnfocusedColor = Color.Red;
     dataFormItem.FocusedColor   = Color.Blue;
     view.TextColor = Color.DarkOrange;
 }
 protected override void OnInitializeView(DataFormItem dataFormItem, Entry view)
 {
     base.OnInitializeView(dataFormItem, view);
     dataFormItem.UnfocusedColor = Color.Brown;
     dataFormItem.FocusedColor   = Color.DarkGreen;
     view.TextColor = Color.DarkViolet;
 }
Ejemplo n.º 7
0
        public override AppViewDataFormLoadResult Load()
        {
            System.Reflection.Assembly execAssembly = System.Reflection.Assembly.GetExecutingAssembly();
            Uri           fileUri          = new Uri(execAssembly.CodeBase);
            FileInfo      execAssemblyFile = new FileInfo(fileUri.LocalPath);
            DirectoryInfo execAssemblyDir  = execAssemblyFile.Directory;

            var dllFiles = execAssemblyDir.GetFiles("OmaticSoftware.*.dll");

            List <DataFormItem> versionDfis = new List <DataFormItem>();

            foreach (var dllFileName in dllFiles)
            {
                var          assemblyName = System.Reflection.AssemblyName.GetAssemblyName(dllFileName.FullName);
                DataFormItem dfi          = new DataFormItem(new List <string>(new string[] { "NAME", "VERSION" }));
                dfi.SetValue("NAME", assemblyName.Name);
                dfi.SetValue("VERSION", assemblyName.Version.ToString());
                dfi.SetValue("DATEMODIFIED", dllFileName.LastWriteTime);
                versionDfis.Add(dfi);
            }

            VERSIONS = versionDfis.ToArray();

            return(new AppViewDataFormLoadResult(true));
        }
 protected override void OnInitializeView(DataFormItem dataFormItem, CustomEntry view)
 {
     view.BackgroundColor  = Color.Pink;
     view.Placeholder      = "Enter value";
     view.PlaceholderColor = Color.DarkBlue;
     view.Text             = "Syncfusion";
 }
 protected override void OnInitializeView(DataFormItem dataFormItem, SfComboBox view)
 {
     base.OnInitializeView(dataFormItem, view);
     view.IsEditableMode = true;
     view.Unfocused     += View_Unfocused;
     dropDownItem        = dataFormItem as DataFormDropDownItem;
 }
 protected override void OnInitializeView(DataFormItem dataFormItem, Entry view)
 {
     base.OnInitializeView(dataFormItem, view);
     if (dataFormItem.Name == "Name")
     {
         view.Focus();
     }
 }
Ejemplo n.º 11
0
 protected override int GetLeftPaddingForLabel(DataFormItem dataFormItem)
 {
     if (dataFormItem.Name.Equals("SaveTo"))
     {
         return(60);
     }
     return(base.GetLeftPaddingForLabel(dataFormItem));
 }
        protected override View GenerateViewForLabel(DataFormItem dataFormItem)
        {
            var view     = base.GenerateViewForLabel(dataFormItem);
            var textView = (view as Label);

            textView.TextColor = Color.Blue;
            return(view);
        }
 protected override nfloat GetLeftPaddingForEditor(DataFormItem dataFormItem)
 {
     if (dataFormItem.Name.Equals("MiddleName") || dataFormItem.Name.Equals("LastName") || dataFormItem.Name.Equals("ContactType") || dataFormItem.Name.Equals("EmailType") || dataFormItem.Name.Equals("AddressTypes"))
     {
         return(56);
     }
     return(base.GetLeftPaddingForEditor(dataFormItem));
 }
Ejemplo n.º 14
0
 protected override int GetLeftPaddingForEditor(DataFormItem dataFormItem)
 {
     if (dataFormItem.Name.Equals("MiddleName") || dataFormItem.Name.Equals("LastName"))
     {
         return(56);
     }
     return(base.GetLeftPaddingForEditor(dataFormItem));
 }
        public override DataFormItem ToDataFormItem(bool includeDBReadOnlyFields)
        {
            DataFormItem dataFormItem = base.ToDataFormItem(includeDBReadOnlyFields);

            dataFormItem.SetValue(this.DATERAGESTART.Name, (object)this.DateRangeHandler.FromDateValue);
            dataFormItem.SetValue(this.DATERAGEEND.Name, (object)this.DateRangeHandler.ToDateValue);
            dataFormItem.SetValue(this.DATERANGEDISPLAY.Name, (object)this.DateRangeHandler.DateRangeDisplay);
            return(dataFormItem);
        }
        /// <summary>
        /// Gets left start offset for editor.
        /// </summary>
        /// <param name="dataFormItem">DataFormItem of the editor.</param>
        /// <returns>Returns left padding value for editor.</returns>
        protected override int GetLeftPaddingForEditor(DataFormItem dataFormItem)
        {
            if (dataFormItem.Name.Equals("Trackhours"))
            {
                return(Device.RuntimePlatform == Device.iOS ? 100 : Device.RuntimePlatform == Device.Android ? 100 : 150);
            }

            return(base.GetLeftPaddingForEditor(dataFormItem));
        }
        protected override void OnUpdateValue(DataFormItem dataFormItem, Entry view)
        {
            var cellValue = this.DataForm.ItemManager.GetValue(dataFormItem);

            if (cellValue != null && view.Text == cellValue.ToString())
            {
                return;
            }
            view.Text = cellValue == null ? string.Empty : cellValue.ToString();
        }
        protected override nfloat GetLeftPaddingForEditor(DataFormItem dataFormItem)
        {
            var item = base.GetLeftPaddingForEditor(dataFormItem);

            if (dataFormItem.Name == "Image")
            {
                return(-300);
            }

            return(item);
        }
Ejemplo n.º 19
0
        protected override View GenerateViewForLabel(DataFormItem dataFormItem)
        {
            var label = base.GenerateViewForLabel(dataFormItem);

            if (label is TextView view)
            {
                view.Typeface = Typeface.DefaultBold;
                view.TextSize = 16;
                view.SetTextColor(Color.White);
            }
            return(label);
        }
Ejemplo n.º 20
0
 protected override nfloat GetLeftPaddingForEditor(DataFormItem dataFormItem)
 {
     if (dataFormItem.Name.Equals("EmailType") || dataFormItem.Name.Equals("AddressTypes"))
     {
         return(50);
     }
     if (!dataFormItem.ShowLabel)
     {
         return(50);
     }
     return(base.GetLeftPaddingForEditor(dataFormItem));
 }
 protected override void OnEditorCreated(DataFormItem dataFormItem, View editor)
 {
     if (dataFormItem.Name == "Address")
     {
         (editor as Entry).TextColor        = Color.YellowGreen;
         (editor as Entry).Placeholder      = "Chennai";
         (editor as Entry).PlaceholderColor = Color.Purple;
         base.OnEditorCreated(dataFormItem, editor);
     }
     else
     {
         base.OnEditorCreated(dataFormItem, editor);
     }
 }
 public void Rotate(DataFormView dataForm, bool newIsVertical)
 {
     if (newIsVertical != isVertical)
     {
         if (dataForm.Items != null)
         {
             isVertical = newIsVertical;
             foreach (KeyValuePair <string, bool> fieldName in fieldNamesToReorder)
             {
                 DataFormItem item     = dataForm.Items.FirstOrDefault(i => i.FieldName == fieldName.Key);
                 int          modifier = newIsVertical ? 1 : -1;
                 if (item != null)
                 {
                     item.RowOrder += modifier;
                     if (fieldName.Value)
                     {
                         item.IsLabelVisible = newIsVertical;
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 23
0
        protected override void OnEditorCreated(DataFormItem dataFormItem, View editor)
        {
            if (editor is EditText edtTxt)
            {
                _editText = edtTxt;
            }


            _editText.Typeface = Typeface.Default;
            _editText.SetBackgroundResource(Resource.Drawable.syncfusion_editText_style);
            _editText.SetTextColor(Color.White);
            _editText.SetHintTextColor(Color.WhiteSmoke);

            _editText.FocusChange += EditText_FocusChange;


            if (dataFormItem.Name == "CountryCode")
            {
                _editText.Focusable = true;
                _editText.Id        = 456342;
                _myEdtTxt           = _editText;
            }
        }
 protected override void OnUpdateReadOnly(DataFormItem dataFormItem, Entry view)
 {
     base.OnUpdateReadOnly(dataFormItem, view);
 }
Ejemplo n.º 25
0
 protected override void OnInitializeView(DataFormItem dataFormItem, Button view)
 {
     view.Text            = ((App.Current.MainPage as MainPage).Picker.ItemsSource).Cast <object>().FirstOrDefault().ToString();
     view.BackgroundColor = Color.LightGray;
 }
Ejemplo n.º 26
0
 protected override Button OnCreateEditorView(DataFormItem dataFormItem)
 {
     return(new Button());
 }
 protected override void OnInitializeView(DataFormItem dataFormItem, Entry view)
 {
     base.OnInitializeView(dataFormItem, view);
     view.Keyboard = Keyboard.Numeric;
 }
 protected override Entry OnCreateEditorView(DataFormItem dataFormItem)
 {
     return(new Entry());
 }
 /// <summary>
 /// Gets left start offset for editor.
 /// </summary>
 /// <param name="dataFormItem">DataFormItem of the editor.</param>
 /// <returns>Returns left padding for editor.</returns>
 protected override int GetLeftPaddingForEditor(DataFormItem dataFormItem)
 {
     return(0);
 }
 protected override void OnInitializeView(DataFormItem dataFormItem, CustomView view)
 {
     base.OnInitializeView(dataFormItem, view);
 }