Пример #1
0
        public override void InitializeEditor(LayoutEditor editor, object value, object dataSource)
        {
            base.InitializeEditor(editor, value, dataSource);

            Editor.DropDownVisible = true;
            Editor.DropDownClick  += OnDropDownClick;

            if (picker == null)
            {
                picker = new OpenFileDialog();
            }

            picker.InitialFileName = value?.ToString();
        }
Пример #2
0
 public override void InitializeEditor(LayoutEditor editor, object value, object dataSource)
 {
     base.InitializeEditor(editor, value, dataSource);
     List.AllowCheck = false;
     if (flag && value != null)
     {
         string svalue = value.ToString();
         foreach (EnumItem enumItem in listSource)
         {
             enumItem.Check = svalue.IndexOf(enumItem.Value.ToString(), StringComparison.OrdinalIgnoreCase) >= 0;
         }
     }
     List.AllowCheck = flag;
 }
Пример #3
0
        protected void InitDefault(LayoutEditor editor, object value, object dataSource)
        {
            filter = string.Empty;
            if (editor.CurrentEditor != null)
            {
                editor.CurrentEditor.FreeEditor();
            }

            editor.CurrentEditor     = this;
            editor.DropDownVisible   = DropDownVisible;
            editor.DropDownExVisible = DropDownExVisible;
            editor.DropDownAutoHide  = dropDownAutoHide;

            Editor   = editor;
            EditItem = dataSource;
        }
Пример #4
0
        public override void InitializeEditor(LayoutEditor editor, object value, object dataSource)
        {
            base.InitializeEditor(editor, value, dataSource);

            if (!ReadOnly)
            {
                editor.DropDownClick += OnDropDownClick;
            }
            editor.DropDownExClick += OnDropDownExClick;
            invoker = null;

            if (dataSource != null)
            {
                invoker = GetFileNameInvoker(dataSource);
            }

            if (invoker != null)
            {
                fdOpen.InitialFileName = invoker.GetValue(dataSource) as string;
            }
        }
Пример #5
0
 public virtual void InitializeEditor(LayoutEditor editor, object value, object dataSource)
 {
     editor.Initialize = true;
     try
     {
         InitDefault(editor, value, dataSource);
         editor.Widget = InitEditorContent();
         if (DropDownWindow)
         {
             InitDropDown();
         }
         Value = value;
         if (editor.Widget is TextEntry textEntry)
         {
             textEntry.SelectionStart  = 0;
             textEntry.SelectionLength = textEntry.Text.Length;
         }
         editor.IsValueChanged = false;
     }
     finally
     {
         editor.Initialize = false;
     }
 }
Пример #6
0
 public override void InitializeEditor(LayoutEditor editor, object value, object dataSource)
 {
     base.InitializeEditor(editor, value, dataSource);
     tempFont = ((TextEntry)Editor.Widget).Font;
 }
Пример #7
0
 public override void InitializeEditor(LayoutEditor editor, object value, object dataSource)
 {
     base.InitializeEditor(editor, value, dataSource);
     tempBack = ((TextEntry)base.Editor.Widget).BackgroundColor;
 }
Пример #8
0
 public override void InitializeEditor(LayoutEditor editor, object value, object dataSource)
 {
     base.InitializeEditor(editor, value, dataSource);
 }