public void ActivateTab(string tabName) { if (Tabnames[tabName]) { return; } IsRunning = true; try { switch (tabName) { case "connectionTabItem": { Tabnames[tabName] = CT.ActivateTab(); break; } case "tableTabItem": { Tabnames[tabName] = TT.ActivateTab(); break; } case "documentTabItem": { Tabnames[tabName] = DT.ActivateTab(Settings.CreateSchema()); break; } } } catch (Exception e) { SIEEMessageBox.Show(e.Message, "Error in " + tabName, MessageBoxImage.Error); DataLoaded = false; SelectedTab = 0; TabNamesReset(); } finally { IsRunning = false; } }
public void ShowVersion() { SIEEMessageBox.Show( "Version 1.6", "CMIS connector for OCC", MessageBoxImage.Information); }
public void FilterButtonHandler() { IsRunning = true; try { LT.LaunchFilterDialog(); } catch (Exception e) { SIEEMessageBox.Show(e.Message, "Unexpected error. Reson:\n", MessageBoxImage.Error); } finally { IsRunning = false; } }
public void LoadFieldsButtonHandler() { IsRunning = true; try { LT.LoadFields(); } catch (Exception e) { SIEEMessageBox.Show(e.Message, "Can't load fields. Reson:\n", MessageBoxImage.Error); } finally { IsRunning = false; } }
private bool callHandler(handler h, string message) { bool result = false; IsRunning = true; try { h(); result = true; } catch (Exception e) { SIEEMessageBox.Show(e.Message, message, MessageBoxImage.Error); } finally { IsRunning = false; } return(result); }
public static void SaveAsDefaultFilter(SPOListFilter filter) { Properties.Settings.Default.DefaultListFilter = Serializer.SerializeToXmlString(filter, Encoding.Unicode); Properties.Settings.Default.Save(); SIEEMessageBox.Show( "Done.", "Save default list filter", System.Windows.MessageBoxImage.Information); }
public void LoginButtonHandler() { IsRunning = true; SqlEESettings.LoginPossible = false; try { CT.LoginButtonHandler(); } catch (Exception e) { SIEEMessageBox.Show(e.Message, "Login error", MessageBoxImage.Error); } finally { IsRunning = false; } DataLoaded = true; SqlEESettings.LoginPossible = true; SelectedTab = 1; }
public override List <TVIModel> GetChildren() { List <TVIModel> result = new List <TVIModel>(); try { foreach (CMISFolder f in CMISFolder.GetAllSubFolders()) { result.Add((TVIModel) new CMISFolderNode(this, f)); } } catch (Exception e) { SIEEMessageBox.Show( "Error loading subfolders\n" + e.Message, "CMIS Connector", System.Windows.MessageBoxImage.Error); } return(result); }
private SPOListFilter getDefaultFilter() { string defaultFilter = Properties.Settings.Default.DefaultListFilter; if (defaultFilter != null && defaultFilter != string.Empty) { try { return(Serializer.DeserializeFromXmlString(defaultFilter, typeof(SPOListFilter), Encoding.Unicode) as SPOListFilter); } catch (Exception e) { SIEEMessageBox.Show( "Cannot retrieve filter settings. Loading system defaults.\n" + e.Message, "Load default settings", System.Windows.MessageBoxImage.Asterisk); } } return(new SPOListFilter() { ValidBaseTypes = new System.Collections.ObjectModel.ObservableCollection <SPOListFilter.BaseType>() { new SPOListFilter.BaseType() { Type = 0 }, new SPOListFilter.BaseType() { Type = 1 }, }, TypeTemplateRanges = new System.Collections.ObjectModel.ObservableCollection <SPOListFilter.TypeTemplateRange>() { new SPOListFilter.TypeTemplateRange() { From = 100, To = 101 } } }); }
public static SPOListFilter LoadFilter() { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "Filter files (*.xml)|*.xml|All files (*.*)|*.*"; dlg.RestoreDirectory = true; if (dlg.ShowDialog() == DialogResult.OK) { try { return(Serializer.DeserializeFromXmlFile(dlg.FileName, typeof(SPOListFilter), Encoding.Unicode) as SPOListFilter); } catch (Exception e) { SIEEMessageBox.Show( "Cannot retrieve filter settings. Loading system defaults.\n" + e.Message, "Load default settings", System.Windows.MessageBoxImage.Asterisk); } } return(null); }
public void ShowVersion() { SIEEMessageBox.Show("SharePoint online connector Version 0.7", "Version", MessageBoxImage.Information); }