public static void CastDocumentCommand(EDocumentCommand _command, EAlphaKind _kind, EAlphaDocumentKind _doc, Guid _uid) { if (DocumentEvent != null) { DocumentEvent(_command, _kind, _doc, _uid); } }
public static void CastUiMessage(EUiEvent _event, EAlphaKind _kind, Guid _id) { if (UIMessage != null) { UIMessage(_event, _kind, _id); } }
private void UiManagerOnDocumentEvent(EDocumentCommand _command, EAlphaKind _model, EAlphaDocumentKind _kind, Guid _uid) { switch (_command) { case EDocumentCommand.OPEN: case EDocumentCommand.OPEN_IN_NEW_TAB: foreach (var alphaPage in m_manager.Documents.OfType <AlphaPage>()) { if (alphaPage.Kind == _kind && alphaPage.CurrentUid == _uid) { m_manager.ActiveContent = alphaPage; alphaPage.Show(m_manager); return; } } var descriptor = UiManager.GetDescriptor(_model, _kind); if (_command == EDocumentCommand.OPEN_IN_NEW_TAB || ActivePage == null) { NewPageExecute(descriptor); } var page = ((AlphaPage)m_manager.ActiveDocument); page.Open(descriptor, _uid); m_manager.ActiveContent = page; page.Show(m_manager); break; case EDocumentCommand.ADD_TO_FAVORITS: case EDocumentCommand.SELECTED: break; default: throw new ArgumentOutOfRangeException("_command"); } }
public AlphaDocumentDescriptor(string _documentName, EAlphaKind _persistedModel, EAlphaDocumentKind _kind, ModifierKeys _modifierKeys, Key _key, Func <TVM, FrameworkElement> _generateFunc) { m_generateFunc = _generateFunc; DocumentName = _documentName; ModifierKeys = _modifierKeys; Key = _key; DocKind = _kind; Kind = _persistedModel; }
void UiManagerDocumentEvent(EDocumentCommand _command, EAlphaKind _kind, EAlphaDocumentKind _documentKind, Guid _uid) { switch (_command) { case EDocumentCommand.SELECTED: m_tb.Text = _documentKind.GetDocumentAddress(_uid); break; } }
private void UiManagerOnUiMessage(EUiEvent _eUiEvent, EAlphaKind _kind, Guid _id) { if (_id != m_vm.Uid) { return; } switch (_eUiEvent) { } }
void UiMangerUIMessage(EUiEvent _message, EAlphaKind _kind, Guid _arg) { if(_kind!=EAlphaKind.PORTFOLIO) return; switch (_message) { case EUiEvent.SELECTED: SelectedItem = Items.First(_vm => _vm.Uid == _arg); break; default: throw new ArgumentOutOfRangeException("_message"); } }
void UiMangerUIMessage(EUiEvent _message, EAlphaKind _kind, Guid _arg) { if (_kind != EAlphaKind.PORTFOLIO) { return; } switch (_message) { case EUiEvent.SELECTED: SelectedItem = Items.First(_vm => _vm.Uid == _arg); break; default: throw new ArgumentOutOfRangeException("_message"); } }
private void UiManagerOnUiMessage(EUiEvent _eUiEvent, EAlphaKind _kind, Guid _uid) { if (_eUiEvent == EUiEvent.REF_DELETED) { var toDel = m_history.Where(_tuple => _tuple.Item1 == _uid).ToArray(); if (toDel.Length > 0) { foreach (var tuple in toDel) { var index = m_history.IndexOf(tuple); m_history.Remove(tuple); if (index <= m_current) { m_current--; } } if (m_current < 0) { m_current = 0; } if (m_history.Count == 0) { Close(); return; } UpdateContent(); } } if (_uid != CurrentUid) { return; } switch (_eUiEvent) { } }
public static IEnumerable <IAlphaDocumentDescriptor> GetDocumentDescriptors(EAlphaKind _model) { return(m_documentDescriptors[_model].Values); }
private void UiManagerOnUiMessage(EUiEvent _eUiEvent, EAlphaKind _kind, Guid _id) { if (_id != m_vm.Uid) return; switch (_eUiEvent) { } }
public static IAlphaDocumentDescriptor GetDescriptor(EAlphaKind _model, EAlphaDocumentKind _kind) { return(m_documentDescriptors[_model][_kind]); }
public static IAlphaDocumentDescriptor GetDescriptor(EAlphaKind _model, EAlphaDocumentKind _kind) { return m_documentDescriptors[_model][_kind]; }
private void UiManagerOnUiMessage(EUiEvent _eUiEvent, EAlphaKind _kind,Guid _uid) { if (_eUiEvent==EUiEvent.REF_DELETED) { var toDel = m_history.Where(_tuple => _tuple.Item1 == _uid).ToArray(); if (toDel.Length > 0) { foreach (var tuple in toDel) { var index = m_history.IndexOf(tuple); m_history.Remove(tuple); if (index <= m_current) { m_current--; } } if (m_current < 0) { m_current = 0; } if (m_history.Count == 0) { Close(); return; } UpdateContent(); } } if(_uid!=CurrentUid) return; switch (_eUiEvent) { } }
public static IEnumerable<IAlphaDocumentDescriptor> GetDocumentDescriptors(EAlphaKind _model) { return m_documentDescriptors[_model].Values; }
private void UiManagerOnDocumentEvent(EDocumentCommand _command, EAlphaKind _model, EAlphaDocumentKind _kind, Guid _uid) { switch (_command) { case EDocumentCommand.OPEN: case EDocumentCommand.OPEN_IN_NEW_TAB: foreach (var alphaPage in m_manager.Documents.OfType<AlphaPage>()) { if(alphaPage.Kind==_kind && alphaPage.CurrentUid==_uid) { m_manager.ActiveContent = alphaPage; alphaPage.Show(m_manager); return; } } var descriptor = UiManager.GetDescriptor(_model, _kind); if (_command==EDocumentCommand.OPEN_IN_NEW_TAB || ActivePage==null) { NewPageExecute(descriptor); } var page = ((AlphaPage)m_manager.ActiveDocument); page.Open(descriptor, _uid); m_manager.ActiveContent = page; page.Show(m_manager); break; case EDocumentCommand.ADD_TO_FAVORITS: case EDocumentCommand.SELECTED: break; default: throw new ArgumentOutOfRangeException("_command"); } }
private void UiManagerUIMessage(EUiEvent _arg1, EAlphaKind _arg2, Guid _arg3) { }