public void OnDialogClosed(IQuickFilingDialog qfDialog) { try { if (!string.IsNullOrEmpty(qfDialog.SelectedItem)) { if (_hierarchyType == HierarchyType.Pages) { //MessageBox.Show(qfDialog.SelectedItem.ToString()); string mmGuid = OnenoteUtils.AddOrGetMeta(qfDialog.SelectedItem, new Meta("mindmanagerguid", Guid.NewGuid().ToString())); string ret = OnenoteUtils.GetLink(qfDialog.SelectedItem); ret += "&mm-guid={" + mmGuid + "}"; retlink = ret.ToString(); } else if (_hierarchyType == HierarchyType.Sections) { retlink = qfDialog.SelectedItem; } } else { throw new OneMapException("No Item selected"); } } catch (Exception ex) { throw new OneMapException("could not add meta->OnDialogClosed+++" + ex.ToStringReflection(), ex, ex.GetBaseException()); } finally { exitThread = false; } }
public void OnDialogClosed(IQuickFilingDialog qfDialog) { if (!Electron.WindowManager.BrowserWindows.Any() || qfDialog.SelectedItem == null) { return; } var hierarchyId = qfDialog.SelectedItem; var javascript = $"{callbackFunction}('{hierarchyId}')"; AsyncUtil.RunSync(() => ElectronUtils.ExecuteJavascript(javascript)); }
public void OnDialogClosed(IQuickFilingDialog qfDialog) { try { // On cancel the IQuickFilingDialog.pressedButton returns -1 // other buttons start from 0 to ... if (qfDialog.PressedButton == 0) { if (_hierarchyType == HierarchyType.Pages) { ImportPageLink(qfDialog.SelectedItem); } else if (_hierarchyType == HierarchyType.Sections) { ImportSectionLinks(qfDialog.SelectedItem); } } } catch (Exception ex) { throw new OneMapException(">OnDialogClosed+++" + ex.ToStringReflection(), ex, ex.GetBaseException()); } }
public void OnDialogClosed(IQuickFilingDialog dialog) { userCallback(dialog.SelectedItem); }