public bool GenericEditEvent(IEditable _geditForm, BindingSource actualEvents, bool isNew = false) { ulog = UserLog.Instance; try { DataRowView eventDataRowView; eventDataRowView = (isNew == false) ? (DataRowView)actualEvents.Current : (DataRowView)actualEvents.AddNew(); if (eventDataRowView == null) throw new Exception("Нет записей для редактирования."); using (IEditable editForm = _geditForm) { if (editForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { actualEvents.EndEdit(); DateTime dt; string _edit = (isNew == false) ? "Изменено " : "Добавлено "; if (eventDataRowView.Row.Table.Columns.Contains("ActionDate")) { dt = Convert.ToDateTime(eventDataRowView["ActionDate"]); _edit += "мероприятие на " + dt.ToShortDateString() + "."; } else if (eventDataRowView.Row.Table.Columns.Contains("DayID")) { _edit += "календарное мероприятие. День недели: " + DatabaseConstant.LocalDayOfWeek[Convert.ToInt32(eventDataRowView["DayID"]) - 1] + "."; } ulog.Message(_edit, UserLogMessageLevel.Warning); return true; } else { actualEvents.CancelEdit(); return false; } } } catch (Exception ex) { ulog.Message(ex.Message, UserLogMessageLevel.Error); return false; } }
/// <summary> /// Handles the objects which will be displayed through this form /// for editing and previewing. /// </summary> /// <param name="obj">The object to edit with this form, must be a PFunction2D.</param> public override void Bind(IEditable obj) { base.m_Function = (Function)obj; // Remove some tabs which have no meaning for this use. base.tabControlEditFunctions.Controls.Remove(tabPageAnaliticFunctionData); base.tabControlEditFunctions.Controls.Remove(tabPageEditZRCalibrator); // Temporarily remove the data sources as it's not supported yet. base.tabControlEditFunctions.Controls.Remove(tabPageDataSource); base.buttonImport.Hide(); // Sets the selected tab to be the first. base.tabControlEditFunctions.SelectedIndex = 0; // Set the interpolation types. this.interpolationExtrapolationControlPF.SetInterpolationType(((PFunction2D)m_Function).Interpolation); this.interpolationExtrapolationControlPF.LeastSquareCoefficients = ((PFunction2D)m_Function).LeastSquaresCoefficients; this.interpolationExtrapolationControlPF.SetExtrapolationType(((PFunction2D)m_Function).Extrapolation); // Load the data from the function on the grid. PointFunctionDataToDataGrid(); // Setup additional operations on the Datagrid to allow editing columns/rows. base.fairmatDataGridViewPointData.EnableColumnRename = true; base.fairmatDataGridViewPointData.EnableRowRename = true; base.fairmatDataGridViewPointData.EnableColumnEditing = true; base.fairmatDataGridViewPointData.ColumnRenameOperationName = "Change x cordinate"; base.fairmatDataGridViewPointData.RowRenameOperationName = "Change y cordinate"; }
public EditableInsertAction(IEditable editable, int start, string text, int length) { this.editable = editable; this.text = text; this.index = start; this.is_paste = length > 1; }
void Init(IViewContent view) { this.view = view; editable = view.GetService<IEditable>(); textEditor = view.GetService<ITextEditor>(); textEditorOptions = textEditor.Options; }
void ITextWatcher.AfterTextChanged(IEditable s) { if (AfterTextChanged != null) { AfterTextChanged(s); } }
protected void AddEditable() { editable = GetEditable(CurrentItem); editor = editable.AddTo(this); if (!Page.IsPostBack) editable.UpdateEditor(CurrentItem, editor); }
void Init(IViewContent view) { this.view = view; editable = view as IEditable; textEditorProvider = view as ITextEditorProvider; textEditor = textEditorProvider.TextEditor; textEditorOptions = textEditor.Options; }
public void AfterTextChanged(IEditable s) { var converted = HiraganaConverter.Convert (s.ToString()); if (s.ToString() == converted) { return; } s.Replace (0, s.Length(), converted); }
public void AfterTextChanged(IEditable s) { if (EditText.Text.Length != 0) { EditText.ClearFocus(); NextEditText.RequestFocus(); NextEditText.Enabled = true; } }
public void HandleTag(bool opening, string tag, IEditable output, IXMLReader xmlReader) { if (tag.Equals("ulc")) { _parent = "ulc"; _index = 1; } else if (tag.Equals("olc")) { _parent = "olc"; _index = 1; } if (!tag.Equals("lic")) { return; } var lastChar = (char)0; if (output.Length() > 0) { lastChar = output.CharAt(output.Length() - 1); } if (_parent.Equals("ulc")) { if (_first) { output.Append(lastChar == '\n' ? "\t• " : "\n\t• "); _first = false; } else { _first = true; } } else { if (_first) { if (lastChar == '\n') { output.Append("\t" + _index + ". "); } else { output.Append("\n\t" + _index + ". "); } _first = false; _index++; } else { _first = true; } } }
protected void AddEditable() { editable = GetEditable(CurrentItem.GetContentType()); editor = editable.AddTo(this); if (!Page.IsPostBack) { editable.UpdateEditor(CurrentItem, editor); } }
public EditableEraseAction(IEditable editable, int start, int end) { this.editable = editable; this.text = editable.GetChars (start, end); this.start = start; this.end = end; this.is_cut = end - start > 1; this.is_forward = editable.Position < start; }
private void ClearSpanType(IEditable e, Java.Lang.Class spanType) { CharacterStyle[] spans = (CharacterStyle[])e.GetSpans(0, e.Length(), spanType); for (int n = spans.Length; n-- > 0;) { e.RemoveSpan(spans[n]); } }
/** * Mark the opening tag by using private classes */ private void Start(IEditable output, Java.Lang.Object mark) { int len = output.Length(); output.SetSpan(mark, len, len, SpanTypes.MarkMark); // if (HtmlTextView.DEBUG) { // Log.d(HtmlTextView.TAG, "len: " + len); // } }
public IEditableVariable CreateVariable(IEditable content = null, bool nullable = false) { IEditableVariable v = new EditableVariable(this, nullable); if (content != null) { v.Set(content); } return(v); }
public void AfterTextChanged(IEditable s) { if (consume_send) { consume_send = false; return; } UploadChanges(); }
public void AfterTextChanged(IEditable s) { if (parent.consume_name_send) { parent.consume_name_send = false; return; } parent.UpdateName(); }
public void AfterTextChanged(IEditable s) { handler.RemoveCallbacks(workRunnable); workRunnable = new Runnable(new Action(delegate { TextChange(); })); handler.PostDelayed(workRunnable, DELAY); }
protected override void OnControlAdded(ControlEventArgs e) { IEditable we = e.Control as IEditable; if (we != null) { we.OnParentEditableChanged(EventArgs.Empty); } base.OnControlAdded(e); }
public IEditable CreatePrimitive(object value) { IEditable e = value as IEditable; if (e != null) { return(e); } return(new EditablePrimitive(this, value)); }
protected override bool DrawInspectorGUI(Rect rect, IEditable target) { var editable = (EditablePosition)target; Rect lowerRect = new Rect(rect.x, rect.y + rect.height / 2f, rect.width, DefaultHeight); var lastPosition = editable.position; editable.position = EditorGUI.Vector3Field(lowerRect, GUIContent.none, lastPosition); return(lastPosition != editable.position); }
void ITextWatcher.AfterTextChanged(IEditable s) { if (s.Length() > 0 && _txtFloatingLabel.Visibility == ViewStates.Invisible) { ShowFloatingLabel(); } else if (s.Length() == 0 && _txtFloatingLabel.Visibility == ViewStates.Visible) { HideFloatingLabel(); } }
public void AfterTextChanged(IEditable editable) { /*EditText editText = editTextWeakReference; * if (editText == null) return; * editText.RemoveTextChangedListener(this); * * BigDecimal parsed = parseToBigDecimal(editable.ToString(), locale); * string formatted = NumberFormat.GetCurrencyInstance(locale).Format(parsed); * // NumberFormat.getNumberInstance(locale).format(parsed); // sem o simbolo de moeda */ }
string GetFileContentFromOpenFile(string fileName) { IViewContent viewContent = FileService.GetOpenFile(fileName); IEditable editable = viewContent as IEditable; if (editable != null) { return(editable.Text); } return(null); }
public static void DrawControls(Graphics graph, PointF rootPos, IEditable o, DrawParametres p) { PointV p0 = new PointV(o.Location); PointV pp = new PointV(o.ParentPoint); PointV p0r, ppr; p0r = new PointV(PointV.Add(rootPos, p0.Point)); ppr = new PointV(PointV.Add(rootPos, pp.Point)); PointF p0f = p0r.Point; PointF ppf = ppr.Point; Pen linePen = new Pen(Color.Gray); linePen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; graph.DrawLine(linePen, p0f, ppf); graph.DrawEllipse(Pens.Blue, ppf.X - 2, ppf.Y - 2, 4, 4); float x1Size = 20; graph.DrawLine(Pens.Blue, p0f.X, p0f.Y - x1Size, p0f.X, p0f.Y + x1Size); graph.DrawLine(Pens.Blue, p0f.X - x1Size, p0f.Y, p0f.X + x1Size, p0f.Y); if (o is BoneImage) { } PointV p1; PointV p2; if ((p & DrawParametres.DrawAngleCtl) == DrawParametres.DrawAngleCtl/* || (p & DrawParametres.DrawFreeEditCtl) == DrawParametres.DrawFreeEditCtl*/) { Pen pen = new Pen(Color.Green); int r = 20; pen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor; pen.Width = 5f; p2 = new PointV(o.AbsoluteAngle, 50, true); p2 = p2.Add(rootPos).Add(p0); float k = (float)(180 / Math.PI); graph.DrawArc(pen, new RectangleF((float)p2.X - r, (float)p2.Y - r, r * 2, r * 2), (float)o.AbsoluteAngle * k, 90); graph.DrawArc(pen, new RectangleF((float)p2.X - r, (float)p2.Y - r, r * 2, r * 2), (float)o.AbsoluteAngle * k, -90); } if ((p & DrawParametres.DrawShiftCtl) == DrawParametres.DrawShiftCtl) { int padding = 4; int length = 16; Pen pen = new Pen(Color.Blue); pen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor; pen.Width = 5f; p2 = p0.Add(rootPos); graph.DrawLine(pen, (float)p2.X, (float)p2.Y + padding, (float)p2.X, (float)p2.Y + padding + length); graph.DrawLine(pen, (float)p2.X, (float)p2.Y - padding, (float)p2.X, (float)p2.Y - padding - length); graph.DrawLine(pen, (float)p2.X + padding, (float)p2.Y, (float)p2.X + padding + length, (float)p2.Y); graph.DrawLine(pen, (float)p2.X - padding, (float)p2.Y, (float)p2.X - padding - length, (float)p2.Y); } }
internal ListBuilder StartList(bool ordered, IEditable output) { if (_parent == null) { if (output.Length() > 0) { output.Append("\n "); } } return(new ListBuilder(this, ordered)); }
public override NodeData.ParameterData ReadDomainNode(IEditable parameterNode) { var parameterNameParameter = parameterNode.Parameters.Single(p => p.Id == DomainIDs.PARAMETER_NAME) as IStringParameter; var parameterName = parameterNameParameter.Value; var parameterTypeParameter = parameterNode.Parameters.Single(p => p.Id == DomainIDs.PARAMETER_TYPE) as IEnumParameter; var parameterType = parameterTypeParameter.Value; var parameterDefParameter = parameterNode.Parameters.Single(p => p.Id == DomainIDs.PARAMETER_DEFAULT) as IDecimalParameter; var parameterDef = parameterDefParameter.Value; return(new NodeData.ParameterData(parameterName, ID <Parameter> .ConvertFrom(parameterNode.NodeID), ID <ParameterType> .FromGuid(parameterType), parameterDef.ToString())); }
public void AfterTextChanged(IEditable s) { if (parent.consume_send_name) { parent.consume_send_name = false; return; } timer = new Timer(); timer.Schedule(new UpdatenameTask(this.parent), 3000); }
public void AfterTextChanged(IEditable s) { if (s.Length() == 0) { ovIB_Enviar.SetImageResource(Resource.Drawable.input_send); } else { ovIB_Enviar.SetImageResource(Resource.Drawable.input_send); } }
public void HandleTag(bool opening, string tag, IEditable output, IXMLReader xmlReader) { tag = tag.ToLowerInvariant(); if (tag == "hr" && opening) { output.Append("---------------------------------------------\r\n"); } else if (TAGS_WITH_IGNORED_CONTENT.Contains(tag)) { HandleIgnoredTag(opening, output); } }
public void AfterTextChanged(IEditable s) { if (_hexEditText.IsFocused) { var color = ParseColorString(s.ToString()); if (color != _colorPicker.GetColor()) { _fromEditText = true; _colorPicker.SetColor(color, true); } } }
public virtual void OnEditableChanged(EventArgs e) { foreach (Control c in Controls) { IEditable ep = c as IEditable; if (ep != null) { ep.OnParentEditableChanged(e); } } Invalidate(); }
public void AfterTextChanged(IEditable s) { if (mIsInitialLoad) { mIsInitialLoad = false; //disable ok int colorInt = mContext.GetColor(Resource.Color.jepoyGray); Color color = new Color(colorInt); mNumpadOk.SetTextColor(color); mNumpadOk.Enabled = false; } }
protected override void OnIsDirtyChanged(IEditable eo) { base.OnIsDirtyChanged(eo); SaveCommand.RaiseCanExecuteChanged(); SaveAndCloseCommand.RaiseCanExecuteChanged(); if (Mode != ObjectViewModelMode.Object) { RiseCommandsCanExecuteChanged(); } }
public void HandleTag(bool opening, string tag, IEditable output, IXMLReader xmlReader) { Console.WriteLine("Tag:" + tag); if (tag.Equals("ulc") && !opening) { output.Append("\n"); } else if (tag.Equals("lic") && opening) { output.Append("\n\t•\t"); } }
void Inspector_ValueChange(IEditable sender, EditEventArgs args, Event nativeEvent) { if (sender is Control) { Control control = sender as Control; if (m_inspectorFields.ContainsKey(control)) { m_inspectorFields[control].SetValue(m_inspectorTarget, args.newValue, null); } } }
public void changeColorOfSelectedFigure(Color color) { if (selectedFigure != null) { IEditable editFigure = selectedFigure as IEditable; if (editFigure != null) { editFigure.changeColor(color); Redraw(); } } }
public static void SimpleTextBox(string leftLabel, IEditable ed, string rightLabel = "", float width = 100, GUIStyle rightLabelStyle = null) { if (rightLabelStyle == null) { rightLabelStyle = GUI.skin.label; } GUILayout.BeginHorizontal(); GUILayout.Label(leftLabel, rightLabelStyle, GUILayout.ExpandWidth(true)); ed.text = GUILayout.TextField(ed.text, GUILayout.ExpandWidth(true), GUILayout.Width(width)); GUILayout.Label(rightLabel, GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); }
/// <summary> /// Requests edit to editor application. /// </summary> /// <privilege>http://tizen.org/privilege/datasharing</privilege> /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception> /// <exception cref="NotSupportedException">Thrown when the watchface complication is not supported.</exception> /// <exception cref="UnauthorizedAccessException">Thrown when the application does not have privilege to access this method.</exception> /// <example> /// <code> /// public class MyContainer : EditablesContainer { /// public MyContainer() : base() /// { /// } /// protected override void OnEditReady(string editorId) /// { /// this.RequestEdit(); /// } /// } /// </code> /// </example> /// <since_tizen> 6 </since_tizen> public void RequestEdit() { Log.Debug(_logTag, "request edit"); ComplicationError ret; Interop.WatchfaceComplication.GetEditableContainer(out _container); if (_container == IntPtr.Zero) { ErrorFactory.ThrowException(ComplicationError.EditNotReady, "Editor not ready"); } if (_editableUpdatedCallback == null) { _editableUpdatedCallback = new Interop.WatchfaceComplication.EditableUpdateRequestedCallback(EditableUpdatedCallback); } foreach (Complication comp in _compList) { IEditable e = comp; IntPtr hi = IntPtr.Zero; if (e.Highlight != null && e.Highlight.Raw != IntPtr.Zero) { hi = e.Highlight.Raw; } Interop.WatchfaceComplication.AddComplication(_container, e.EditableId, comp._handle, hi); } foreach (DesignElement de in _deList) { IEditable e = de; IntPtr candidates; Interop.WatchfaceComplication.CreateCandidatesList(out candidates); foreach (Bundle b in de.Candidates) { Interop.WatchfaceComplication.AddCandidatesListItem(candidates, b.SafeBundleHandle); } IntPtr hi = IntPtr.Zero; if (e.Highlight != null && e.Highlight.Raw != IntPtr.Zero) { hi = e.Highlight.Raw; } Interop.WatchfaceComplication.AddDesignElement(_container, e.EditableId, e.GetCurrentDataIndex(), candidates, hi, e.Name); Log.Debug(_logTag, "Add design element done :" + e.Name); } ret = Interop.WatchfaceComplication.RequestEdit(_container, _editableUpdatedCallback, IntPtr.Zero); if (ret != ComplicationError.None) { ErrorFactory.ThrowException(ret, "Request edit fail"); } }
void m_treeIdField_ValueChange( IEditable sender, EditEventArgs args, Event nativeEvent ) { string s = args.newValue as string; if ( string.IsNullOrEmpty( s ) ) { m_generateButton.Enabled = false; } else { m_generateButton.Enabled = true; } }
public virtual void AfterTextChanged(IEditable text) { SetLoadingContent(); Criteria.Name = text.ToString(); var token = CancelAndSetTokenForView(ItemList); Task.Run(async() => { await GetItems(token); }, token); }
public void AfterTextChanged(IEditable s) { // Remove spacing char if (s.Length() > 0 && (s.Length() % 5) == 0) { char c = s.CharAt(s.Length() - 1); if (space == c) { s.Delete(s.Length() - 1, s.Length()); } } // Insert char where needed. if (s.Length() > 0 && (s.Length() % 5) == 0) { char c = s.CharAt(s.Length() - 1); // Only if its a digit where there should be a space we insert a space if (Character.IsDigit(c) && TextUtils.Split(s.ToString(), space.ToString()).Length <= 3) { s.Insert(s.Length() - 1, space.ToString()); } } }
private void Format(IEditable text) { if (text.Length() > 0) { for (int i = text.Length(); i > 0; i--) { if (!Character.IsDigit(text.CharAt(i - 1)) || ((deleting && i == start) && (isFormatChar(i)))) { text.Delete(i - 1, i); } } for (int i = 0; i < GetStringEnd(text); i++) { if (isFormatChar(i)) { text.Insert(i, Java.Lang.String.ValueOf(format[i])); } } } }
/// <summary> /// Handles the objects which will be displayed through this form /// for editing and previewing. /// </summary> /// <param name="obj">The object to edit with this form, must be a PFunction2D.</param> public override void Bind(IEditable obj) { base.m_Function = (Function)obj; // Remove some tabs which have no meaning for this use. base.tabControlEditFunctions.Controls.Remove(base.tabPageAnaliticFunctionData); base.tabControlEditFunctions.Controls.Remove(base.tabPageEditZRCalibrator); // Temporarily remove the data sources as it's not supported yet. base.tabControlEditFunctions.Controls.Remove(base.tabPageDataSource); // Change the behavior of the Import button Control buttonImportContainer = base.buttonImport.Parent; buttonImportContainer.Controls.Remove(base.buttonImport); Button buttonImport = new Button(); buttonImport.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonImport.AutoSize = true; buttonImport.Margin = new System.Windows.Forms.Padding(3); buttonImport.Text = "Import From Clipboard"; buttonImport.Click += new EventHandler(buttonImport_Click); buttonImportContainer.Controls.Add(buttonImport); // Sets the selected tab to be the first. base.tabControlEditFunctions.SelectedIndex = 0; // Set the interpolation types. this.interpolationExtrapolationControlPF.SetInterpolationType(((PFunction2D)m_Function).Interpolation); this.interpolationExtrapolationControlPF.LeastSquareCoefficients = ((PFunction2D)m_Function).LeastSquaresCoefficients; this.interpolationExtrapolationControlPF.SetExtrapolationType(((PFunction2D)m_Function).Extrapolation); // Load the data from the function on the grid. PointFunctionDataToDataGrid(); // Setup additional operations on the Datagrid to allow editing columns/rows. base.fairmatDataGridViewPointData.EnableColumnRename = true; base.fairmatDataGridViewPointData.EnableRowRename = true; base.fairmatDataGridViewPointData.EnableColumnEditing = true; base.fairmatDataGridViewPointData.ColumnRenameOperationName = "Change x coordinate"; base.fairmatDataGridViewPointData.RowRenameOperationName = "Change y coordinate"; }
public bool GenericEditAction(IEditable _geditForm, BindingSource actualActions, BindingSource groupHeadersList, bool isNew = false) { ulog = UserLog.Instance; try { DataRowView actionDataRowView; actionDataRowView = (isNew == false) ? (DataRowView)actualActions.Current : (DataRowView)actualActions.AddNew(); if (actionDataRowView == null) throw new Exception("Нет записей для редактирования."); using (IEditable editActForm = _geditForm) {//открываем форму и сохраняем изменения if (editActForm.ShowDialog() == DialogResult.OK) { actualActions.EndEdit(); return true; } else { actualActions.CancelEdit(); return false; } } } catch (Exception ex) { actualActions.CancelEdit(); ulog.Message(ex.Message, UserLogMessageLevel.Error); return false; } finally { groupHeadersList.RemoveFilter(); groupHeadersList.Filter = "[InList] = 1"; } }
private Editor(IEditable d, string titleType, ListViewItem lvi, RichTextBox rtb) { InitializeComponent(); data = d; data.Locked = true; this.lvi = lvi; this.rtb = rtb; // First, set the RichTextBox's Font to the default. // Then, change if text already exists. richText.Font = new Font(Config.EditorFontName, Config.EditorFontSize); frmMain.EditorOpened(); if (titleType == null) this.Text = d.GetType().Name + ": " + d.Title; else this.Text = titleType + ": " + d.Title; richText.Rtf = Utils.TreatRtfFont(data.Text, Config.EditorFontName, Config.EditorFontSize); UpdateButtons(); }
public void AfterTextChanged(IEditable editable) { var args = new AfterTextChangedEventArgs(editable); AfterTextChangedAction.Invoke(editable, args); }
public void AfterTextChanged(IEditable arg0) { }
public void AfterTextChanged(IEditable s) { // nothing needed }
void UpdateEditHandler(DocumentHandler handler) { if (editHandler != null) editHandler.EditStateChanged -= new EventHandler(editHandler_EditStateChanged); editHandler = handler.EditHandler; if (handler.IsEditable) editHandler.EditStateChanged += new EventHandler(editHandler_EditStateChanged); UpdateEditButtons(); }
public void AfterTextChanged (IEditable s) { String account = s.ToString (); AccountStorage.SetAccount (Activity, account); }
void ITextWatcher.AfterTextChanged(IEditable s) { if (Mask != null) { if (!_editingAfter && _editingBefore && _editingOnChanged) { _editingAfter = true; if (_rawText.Length == 0 && HasHint) { _selection = 0; Text = null; } else { Text = MakeMaskedText(); } _selectionChanged = false; SetSelection(_selection); _editingBefore = false; _editingOnChanged = false; _editingAfter = false; _ignore = false; } } }
private Document(IWorkbenchWindow window, IEditable editable) { this.window = window; this.editable = editable; }
public static void SimpleTextBox(string leftLabel, IEditable ed, string rightLabel = "", float width = 100) { GUILayout.BeginHorizontal(); GUILayout.Label(leftLabel, GUILayout.ExpandWidth(true)); ed.text = GUILayout.TextField(ed.text, GUILayout.ExpandWidth(true), GUILayout.Width(width)); GUILayout.Label(rightLabel, GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); }
public void AfterTextChanged(IEditable s) { Console.Write("foo"); // nothing needed }
public EditableInfoItem(object obj, MemberInfo member, EditableInfoItemAttribute attribute) : base(attribute) { id = this.GetType().Name.Replace("InfoItem", "") + ":" + obj.GetType().Name.Replace("MechJebModule", "") + "." + member.Name; this.rightLabel = attribute.rightLabel; this.width = attribute.width; if (member is FieldInfo) val = (IEditable)((FieldInfo)member).GetValue(obj); else if (member is PropertyInfo) val = (IEditable)((PropertyInfo)member).GetValue(obj, new object[] { }); }
public PreviewViewContent(IViewContent viewContent) : base(viewContent) { TabPageText = "Preview"; editable = viewContent as IEditable; }
void m_savePathField_ValueChange( IEditable sender, EditEventArgs args, Event nativeEvent ) { EditorPrefs.SetString( "BTE_SavePath", ( string )args.newValue ); }
private void DoEdit(IEditable editor) { _currentDataChanged = false; IEditorManager manager = tvProjects.SelectedNode.Tag as IEditorManager; manager.CurrentEditor = editor; if (editor != null) { editor.OnStartEditing(); rsbtnSave.Enabled = false; this.SetEditor(editor.Editor); editor.EditorChanged += delegate(object s, EventArgs arg) { this.SetEditor(editor.Editor); }; editor.DataChanged += delegate(object s, EventArgs arg) { _currentDataChanged = true; rsbtnSave.Enabled = true; }; editor.ChangeRecovered += delegate(object s, EventArgs arg) { _currentDataChanged = false; rsbtnSave.Enabled = false; }; if (_currentEditable != null) { _currentEditable.IsEditing = false; _currentEditable.EditorReloaded -= new EventHandler(_currentEditable_EditorReloaded); } _currentEditable = editor; _currentEditable.IsEditing = true; _currentEditable.EditorReloaded += new EventHandler(_currentEditable_EditorReloaded); } }
internal EditableAlteringManager(IEditable editable) { Editable = editable; AlteringObjectsVisible = false; }