public ResetPassPhraseDialog(SimiasWebService simiasws, iFolderWebService ifws) : base() { this.simws= simiasws; this.ifws = ifws; SetupDialog(); }
/// <summary> /// Default constructor for iFolderConflictResolver /// </summary> public iFolderConflictDialog(Gtk.Window parent, iFolderWeb ifolder, iFolderWebService iFolderWS, SimiasWebService SimiasWS) : base() { this.Title = Util.GS("Resolve Conflicts"); if (iFolderWS == null) { throw new ApplicationException("iFolderWebServices was null"); } this.ifws = iFolderWS; this.simws = SimiasWS; this.ifolder = ifolder; this.HasSeparator = false; this.Resizable = true; this.Modal = true; if (parent != null) { this.TransientFor = parent; } conflictTable = new Hashtable(); InitializeWidgets(); EnableConflictControls(false); this.Realized += new EventHandler(OnRealizeWidget); // Bind ESC and C-w to close the window ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); oldFileName = null; }
/// /// defaultDomainID: If the main iFolders window is currently /// filtering the list of domains, this parameter is used to allow this /// dialog to respect the currently selected domain. public DragCreateDialog(Gtk.Window parentWindow, DomainInformation[] domainArray, string defaultDomainID, string initialPath, iFolderWebService ifws) : base(Util.GS("Convert to an iFolder..."), parentWindow, DialogFlags.Modal | DialogFlags.DestroyWithParent | DialogFlags.NoSeparator, Stock.Help, ResponseType.Help, Stock.Cancel, ResponseType.Cancel, Stock.Ok, ResponseType.Ok) { domains = domainArray; this.defaultDomainID = defaultDomainID; this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png")); this.initialPath = initialPath; this.ifws = ifws; // this.SetPolicy((int)this.AllowShrink, (int)this.AllowGrow, 1); // if (this.initialPath != null && this.initialPath.Length > 0) // this.SetCurrentFolder(this.initialPath); Widget widgets = SetupWidgets(); widgets.ShowAll(); this.VBox.Add(widgets); domainComboBox.Changed += new EventHandler(OnDomainChangedEvent); }
/// <summary> /// Constructor /// </summary> /// <param name="ifws">iFolder WebService</param> /// <param name="simws">SimiasWebService</param> public ExportKeysDialog(iFolderWebService ifws, SimiasWebService simws) : base() { this.ifws = ifws; this.simws = simws; //this.DomainID = DomainID; SetupDialog(); }
/// /// filteredDomainID: If the main iFolders window is currently /// filtering the list of domains, this parameter is used to allow this /// dialog to respect the currently selected domain. public CreateDialog(Gtk.Window parentWindow, DomainInformation[] domainArray, string filteredDomainID, string initialPath, iFolderWebService ifws) : base("", Util.GS("Select a folder..."), parentWindow, FileChooserAction.SelectFolder, Stock.Cancel, ResponseType.Cancel, Stock.Ok, ResponseType.Ok) { domains = domainArray; this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png")); this.initialPath = initialPath; this.ifws = ifws; keyReleasedTimeoutID = 0; if (this.initialPath != null && this.initialPath.Length > 0) { this.SetCurrentFolder(this.initialPath); } // More options expander this.ExtraWidget = CreateMoreOptionsExpander(filteredDomainID); domainComboBox.Changed += new EventHandler(OnDomainChangedEvent); this.SetResponseSensitive(ResponseType.Ok, false); }
/// <summary> /// Default constructor for iFolderPropertiesDialog /// </summary> public iFolderPropertiesDialog(Gtk.Window parent, iFolderWeb ifolder, iFolderWebService iFolderWS, SimiasWebService SimiasWS, Manager simiasManager) : base() { if (iFolderWS == null) { throw new ApplicationException("iFolderWebService was null"); } this.ifws = iFolderWS; if (SimiasWS == null) { throw new ApplicationException("SimiasWebService was null"); } this.simws = SimiasWS; this.simiasManager = simiasManager; // Make sure that we have the latest information by forcing this // a reread from the server. try { this.ifolder = this.ifws.GetiFolder(ifolder.ID); } catch (Exception) { throw new ApplicationException( "Unable to read the iFolder"); } this.Modal = false; this.TypeHint = Gdk.WindowTypeHint.Normal; this.HasSeparator = false; this.Title = string.Format("{0} {1}", ifolder.Name, Util.GS("Properties")); // ifHash = new Hashtable(); InitializeWidgets(); /* iFolderWindow ifwin = (iFolderWindow)parent; * if( ifwin != null) * { * if( ifwin.isConnected == false) * { * this.SettingsPage.EnableSync = false; * } * } */ SetValues(); // Bind ESC and C-w to close the window ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); }
/// <summary> /// Constructor /// </summary> private SimiasEventBroker() { this.simiasManager = Util.GetSimiasManager(); string localServiceUrl = simiasManager.WebServiceUri.ToString(); ifws = new iFolderWebService(); ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath); NodeEventQueue = new Queue(); SyncEventQueue = new Queue(); FileEventQueue = new Queue(); SimiasEventQueue = new Queue(); NotifyEventQueue = new Queue(); SimiasEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnSimiasEventFired)); SyncEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnSyncEventFired)); FileEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnFileEventFired)); GenericEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnGenericEventFired)); SEThread = new Thread(new ThreadStart(SimiasEventThread)); SEThread.IsBackground = true; SEEvent = new ManualResetEvent(false); printErrors = (bool)ClientConfig.Get(ClientConfig.KEY_IFOLDER_DEBUG_PRINT_SIMIAS_EVENT_ERRORS); ClientConfig.SettingChanged += new GConf.NotifyEventHandler(OnSettingChanged); }
public EnterPassphrasePage(iFolderWebService ifws, SimiasWebService simws, Manager simiasManager) { InitializeComponent(); this.simiasWebService = simws; this.ifolderWebService = ifws; this.simiasManager = simiasManager; }
/// <summary> /// Constructs a ServerInfo object. /// </summary> /// <param name="domainInfo">The DomainInformation object for the domain.</param> public ServerInfo(iFolderWebService ifws, Manager simiasManager, DomainInformation domainInfo, string password) { // // Required for Windows Form Designer support // InitializeComponent(); this.domainInfo = domainInfo; this.simiasManager = simiasManager; this.ifWebService = ifws; if (password != null) { this.password.Text = password; rememberPassword.Checked = true; } // Resize/reposition controls int delta = calculateSize(serverLabel2, 0); delta = calculateSize(userLabel2, delta); delta = calculateSize(passwordLabel2, delta); if (delta > 0) { serverLabel2.Width = userLabel2.Width = passwordLabel2.Width += delta; int temp = serverName.Left; serverName.Left = userName.Left = this.password.Left = rememberPassword.Left = serverLabel2.Left + serverLabel2.Width; serverName.Width = userName.Width = this.password.Width = rememberPassword.Width -= serverName.Left - temp; } }
/// <summary> /// CReate the singlePageWizard object /// </summary> /// <param name="ifws"></param> /// <param name="simws"></param> public SinglePageWizard(iFolderWebService ifws, SimiasWebService simws) { InitializeComponent(); this.ifWebService = ifws; this.simiasWebService = simws; SinglePageWizard.log = iFolderLogManager.GetLogger(typeof(SinglePageWizard)); }
private SimiasEventBroker() { this.simiasManager = Util.GetSimiasManager(); string localServiceUrl = simiasManager.WebServiceUri.ToString(); ifws = new iFolderWebService(); ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath); NodeEventQueue = new Queue(); SyncEventQueue = new Queue(); FileEventQueue = new Queue(); SimiasEventQueue = new Queue(); NotifyEventQueue = new Queue(); SimiasEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnSimiasEventFired) ); SyncEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnSyncEventFired) ); FileEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnFileEventFired) ); GenericEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnGenericEventFired) ); SEThread = new Thread(new ThreadStart(SimiasEventThread)); SEThread.IsBackground = true; SEEvent = new ManualResetEvent(false); printErrors = (bool)ClientConfig.Get(ClientConfig.KEY_IFOLDER_DEBUG_PRINT_SIMIAS_EVENT_ERRORS); ClientConfig.SettingChanged += new GConf.NotifyEventHandler(OnSettingChanged); }
/// <summary> /// Checks to see if a path can become an iFolder. /// </summary> /// <param name="path">The path that is tested.</param> /// <returns>The method returns <b>true</b> if the specified path can become an ifolder; otherwise, <b>false</b>.</returns> public bool CanBeiFolder([MarshalAs(UnmanagedType.LPWStr)] string path) { try { // Make sure the user has read/write access to the directory. if (Win32Security.AccessAllowed(path)) { connectToWebService(); if (ifWebService != null) { return(ifWebService.CanBeiFolder(path)); } } } catch (WebException e) { ifWebService = null; if (e.Status == WebExceptionStatus.ProtocolError) { LocalService.ClearCredentials(); } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Caught exception - " + e.Message); } return(false); }
/// <summary> /// Checks if the specified path is an iFolder. /// </summary> /// <param name="path">The path to test.</param> /// <param name="hasConflicts">This parameter returns <b>true</b> if the path is an iFolder and the iFolder contains conflicts.</param> /// <returns>This method returns <b>true</b> if the specified path is an iFolder; otherwise <b>false</b>.</returns> public bool IsiFolder([MarshalAs(UnmanagedType.LPWStr)] string path, out bool hasConflicts) { iFolderWeb ifolder = null; hasConflicts = false; try { connectToWebService(); if (ifWebService != null) { ifolder = ifWebService.GetiFolderByLocalPath(path); if (ifolder != null) { hasConflicts = ifolder.HasConflicts; } } } catch (WebException e) { ifWebService = null; if (e.Status == WebExceptionStatus.ProtocolError) { LocalService.ClearCredentials(); } } catch (Exception e) { System.Diagnostics.Debug.WriteLine("Caught exception - " + e.Message); } return(ifolder != null); }
private SimiasEventBroker() { this.simiasManager = Util.GetSimiasManager(); string localServiceUrl = simiasManager.WebServiceUri.ToString(); ifws = new iFolderWebService(); ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath); NodeEventQueue = new Queue(); SyncEventQueue = new Queue(); FileEventQueue = new Queue(); SimiasEventQueue = new Queue(); NotifyEventQueue = new Queue(); SimiasEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnSimiasEventFired) ); SyncEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnSyncEventFired) ); FileEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnFileEventFired) ); GenericEventFired = new Gtk.ThreadNotify( new Gtk.ReadyEvent(OnGenericEventFired) ); SEThread = new Thread(new ThreadStart(SimiasEventThread)); SEThread.IsBackground = true; SEEvent = new ManualResetEvent(false); }
public ImportKeysDialog(iFolderWebService ifws, SimiasWebService simws) : base() { this.ifws = ifws; this.simws = simws; SetupDialog(); }
/* public bool EnableSync * { * set * { * this.SyncNowButton.Sensitive = value; * } * } */ /// <summary> /// Default constructor for iFolderPropSharingPage /// </summary> public iFolderPropSettingsPage(Gtk.Window topWindow, iFolderWebService iFolderWS) : base() { this.topLevelWindow = topWindow; this.ifws = iFolderWS; InitializeWidgets(); }
public ExportKeysDialog(iFolderWebService ifws, SimiasWebService simws) : base() { this.ifws = ifws; this.simws = simws; this.DomainID = DomainID; SetupDialog(); }
public MigrationPage( Gtk.Window topWindow, iFolderWebService ifws ) : base() { this.topLevelWindow = topWindow; curDomains = new Hashtable(); InitializeWidgets(); this.Realized += new EventHandler(OnRealizeWidget); }
public iFolderPropSettingsPage( Gtk.Window topWindow, iFolderWebService iFolderWS) : base() { this.topLevelWindow = topWindow; this.ifws = iFolderWS; InitializeWidgets(); }
public MigrationDialog( Gtk.Window topWindow, iFolderWebService ifws, SimiasWebService simws, bool ShowForMerge, String ifolderName) { this.Modal = false; this.iFolderName = ifolderName; curDomains = new Hashtable(); CreateWidgets(); PopulateWidgets(); }
/// <summary> /// Default constructor for iFolderPropertiesDialog /// </summary> public iFolderPropertiesDialog(string ifolderID, Manager manager) : base() { if (manager == null) { return; } this.simiasManager = manager; String localServiceUrl = simiasManager.WebServiceUri.ToString(); if (localServiceUrl == null) { return; } this.ifws = new iFolderWebService(); if (this.ifws == null) { throw new ApplicationException( "Unable to obtain iFolderWebService"); } this.ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(this.ifws, simiasManager.WebServiceUri, simiasManager.DataPath); this.simws = new SimiasWebService(); if (this.simws == null) { throw new ApplicationException( "Unable to obtain SimiasWebService"); } this.simws.Url = localServiceUrl + "/Simias.asmx"; LocalService.Start(this.simws, simiasManager.WebServiceUri, simiasManager.DataPath); try { this.ifolder = this.ifws.GetiFolder(ifolderID); } catch (Exception) { throw new ApplicationException( "Unable to read the iFolder"); } this.HasSeparator = false; this.Modal = true; this.Title = Util.GS("iFolder Properties"); // ifHash = new Hashtable(); InitializeWidgets(); SetValues(); // Bind ESC and C-w to close the window ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); }
private void connectToWebService() { if (ifWebService == null) { if (simiasRunning == false) { Process[] processArray = Process.GetProcessesByName("simias"); if (processArray == null || processArray.Length == 0) { System.Diagnostics.Debug.WriteLine(string.Format("simias is not running dude...")); return; } simiasRunning = true; } System.Diagnostics.Debug.WriteLine(string.Format("In connectToWebService(). Simias is running...", SimiasRunning)); /// If simias is not started do not start the web services... //if (SimiasRunning == false) // return; // Use the language stored in the registry. Thread.CurrentThread.CurrentUICulture = new CultureInfo(GetLanguageDirectory()); // Check if the iFolder Client is running. string windowName = resourceManager.GetString("iFolderServices") + Environment.UserName; Novell.Win32Util.Win32Window window = Novell.Win32Util.Win32Window.FindWindow(null, windowName); if (window != null) { DateTime currentTime = DateTime.Now; if ((currentTime.Ticks - ticks) > delta) { ticks = currentTime.Ticks; // The registry holds the information needed to connect to the web service. RegistryKey regKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Novell\iFolder"); if (regKey != null) { string webServiceUri = regKey.GetValue("WebServiceUri") as string; string simiasDataPath = regKey.GetValue("SimiasDataPath") as string; if ((webServiceUri != null) && (simiasDataPath != null)) { ifWebService = new iFolderWebService(); ifWebService.Url = webServiceUri + "/iFolder.asmx"; LocalService.Start(ifWebService, new Uri(webServiceUri), simiasDataPath); simws = new SimiasWebService(); simws.Url = webServiceUri + "/Simias.asmx"; LocalService.Start(simws, new Uri(webServiceUri), simiasDataPath); } regKey.Close(); } } } else { throw new Exception("iFolder Client not running"); } } }
public PrefsGeneralPage( Gtk.Window topWindow, iFolderWebService webService) : base() { this.topLevelWindow = topWindow; this.ifws = webService; InitializeWidgets(); this.Realized += new EventHandler(OnRealizeWidget); }
/// <summary> /// Constructs a ServerPage object. /// </summary> public DefaultiFolderPage(iFolderWebService ifws, SimiasWebService simws, DomainInformation domainInfo) { // This call is required by the Windows Form Designer. this.resManager = new System.Resources.ResourceManager(typeof(Novell.FormsTrayApp.FormsTrayApp)); InitializeComponent(); this.simws = simws; this.domainInfo = domainInfo; this.ifws = ifws; }
/// <summary> /// Default constructor for iFolderAccountsPage /// </summary> public PrefsAccountsPage(Gtk.Window topWindow) : base() { this.topLevelWindow = topWindow; this.simiasManager = Util.GetSimiasManager(); string localServiceUrl = simiasManager.WebServiceUri.ToString(); ifws = new iFolderWebService(); ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath); this.simws = new SimiasWebService(); simws.Url = simiasManager.WebServiceUri.ToString() + "/Simias.asmx"; LocalService.Start(simws, simiasManager.WebServiceUri, simiasManager.DataPath); ClientUpgradeDialog = null; this.ClientUpgradeStatus = null; this.NewClientVersion = null; this.NewClientDomainID = null; curDomains = new Hashtable(); removedDomains = new Hashtable(); InitializeWidgets(); domainProviderUI = DomainProviderUI.GetDomainProviderUI(); domainController = DomainController.GetDomainController(); if (domainController != null) { domainController.DomainAdded += new DomainAddedEventHandler(OnDomainAddedEvent); domainController.DomainDeleted += new DomainDeletedEventHandler(OnDomainDeletedEvent); domainController.DomainLoggedIn += new DomainLoggedInEventHandler(OnDomainLoggedInEvent); domainController.DomainLoggedOut += new DomainLoggedOutEventHandler(OnDomainLoggedOutEvent); domainController.DomainActivated += new DomainActivatedEventHandler(OnDomainActivatedEvent); domainController.DomainInactivated += new DomainInactivatedEventHandler(OnDomainInactivatedEvent); domainController.NewDefaultDomain += new DomainNewDefaultEventHandler(OnNewDefaultDomainEvent); domainController.DomainInGraceLoginPeriod += new DomainInGraceLoginPeriodEventHandler(OnDomainInGraceLoginPeriodEvent); domainController.DomainClientUpgradeAvailable += new DomainClientUpgradeAvailableEventHandler(OnClientUpgradeAvailableEvent); } detailsDialogs = new Hashtable(); this.Realized += new EventHandler(OnRealizeWidget); }
/// <summary> /// constructor /// </summary> /// <param name="service"></param> /// <param name="startupPath"></param> /// <param name="iFolder"></param> public EnhancedConflictResolver(iFolderWebService service, string startupPath, iFolderWeb iFolder) : base(4) { InitializeComponent(); this.MinimumSize = this.Size; this.StartPosition = FormStartPosition.CenterParent; this.ifWebService = service; this.loadPath = startupPath; this.ifolder = iFolder; }
/// <summary> /// Reverts the specified path back to a normal folder. Also remove iFolder / Membership. /// </summary> /// <param name="path">The path to revert back to a normal folder.</param> public void RevertToNormal([MarshalAs(UnmanagedType.LPWStr)] string path) { Cursor.Current = Cursors.WaitCursor; try { connectToWebService(); RevertiFolder revertiFolder = new RevertiFolder(); iFolderWeb ifolder = ifWebService.GetiFolderByLocalPath(path); bool IsMaster = (ifolder.CurrentUserID == ifolder.OwnerID); if (!IsMaster) { revertiFolder.removeFromServer.Text = resourceManager.GetString("AlsoRemoveMembership"); } revertiFolder.removeFromServer.Enabled = simws.GetDomainInformation(ifolder.DomainID).Authenticated; if (revertiFolder.ShowDialog() == DialogResult.Yes) { Cursor.Current = Cursors.WaitCursor; if (ifWebService != null && ifolder != null) { ifWebService.RevertiFolder(ifolder.ID); if (revertiFolder.RemoveFromServer) { if (IsMaster) { ifWebService.DeleteiFolder(ifolder.DomainID, ifolder.ID); } else { ifWebService.DeclineiFolderInvitation(ifolder.DomainID, ifolder.ID); } } } } revertiFolder.Dispose(); } catch (WebException e) { ifWebService = null; if (e.Status == WebExceptionStatus.ProtocolError) { LocalService.ClearCredentials(); } } catch (Exception e) { Cursor.Current = Cursors.Default; Novell.iFolderCom.MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderRevertError"), resourceManager.GetString("revertErrorTitle"), e.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error); mmb.ShowDialog(); mmb.Dispose(); } Cursor.Current = Cursors.Default; }
public MigrationWindow( Gtk.Window topWindow, iFolderWebService ifws, SimiasWebService simws) : base(Util.GS("iFolder Migration")) { this.topLevelWindow = topWindow; this.Modal = false; this.ifws = ifws; this.simws = simws; curDomains = new Hashtable(); CreateWidgets(); PopulateWidgets(); }
/// <summary> /// Displays the Advanced Properties dialog for the specified iFolder. /// </summary> /// <param name="dllPath">The path where the assembly was loaded from.</param> /// <param name="path">The path of the iFolder.</param> /// <param name="tabPage">The index of the tab to display initially.</param> /// <param name="modal">Set to <b>true</b> to display the dialog modal.</param> public void InvokeAdvancedDlg([MarshalAs(UnmanagedType.LPWStr)] string dllPath, [MarshalAs(UnmanagedType.LPWStr)] string path, int tabPage, bool modal) { string windowName = string.Format(resourceManager.GetString("iFolderProperties"), Path.GetFileName(path)); // Search for existing window and bring it to foreground ... Win32Window win32Window = Win32Util.Win32Window.FindWindow(null, windowName); if (win32Window != null) { win32Window.BringWindowToTop(); } else { try { iFolderAdvanced ifolderAdvanced = new iFolderAdvanced(); ifolderAdvanced.Name = path; ifolderAdvanced.Text = windowName; connectToWebService(); ifolderAdvanced.CurrentiFolder = ifWebService.GetiFolderByLocalPath(path); ifolderAdvanced.LoadPath = dllPath; ifolderAdvanced.ActiveTab = tabPage; ifolderAdvanced.DomainName = (simws.GetDomainInformation((ifWebService.GetiFolderByLocalPath(path)).DomainID)).Name; ifolderAdvanced.DomainUrl = (simws.GetDomainInformation((ifWebService.GetiFolderByLocalPath(path)).DomainID)).HostUrl; if (modal) { ifolderAdvanced.ShowDialog(); } else { ifolderAdvanced.Show(); } } catch (WebException e) { MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("propertiesDialogError"), resourceManager.GetString("propertiesErrorTitle"), e.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error); mmb.ShowDialog(); ifWebService = null; if (e.Status == WebExceptionStatus.ProtocolError) { LocalService.ClearCredentials(); } } catch (Exception e) { MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("propertiesDialogError"), resourceManager.GetString("propertiesErrorTitle"), e.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error); mmb.ShowDialog(); } } }
/// <summary> /// Default constructor for iFolderAccountsPage /// </summary> public MigrationPage(Gtk.Window topWindow, iFolderWebService ifws) : base() { this.topLevelWindow = topWindow; // this.ifws = ifws; curDomains = new Hashtable(); InitializeWidgets(); this.Realized += new EventHandler(OnRealizeWidget); }
/// <summary> /// Default constructor for LogWindow /// </summary> public MigrationWindow(Gtk.Window topWindow, iFolderWebService ifws, SimiasWebService simws) : base(Util.GS("iFolder Migration")) { // this.topLevelWindow = topWindow; this.Modal = false; this.ifws = ifws; this.simws = simws; curDomains = new Hashtable(); CreateWidgets(); PopulateWidgets(); }
public PreferencesWindow(iFolderWebService webService, Manager simiasManager) : base(Util.GS("iFolder Preferences")) { if(webService == null) throw new ApplicationException("iFolderWebServices was null"); ifws = webService; InitializeWidgets(simiasManager); ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); }
/// <summary> /// Default constructor for LogWindow /// </summary> public MigrationDialog(Gtk.Window topWindow, iFolderWebService ifws, SimiasWebService simws, bool ShowForMerge, String ifolderName) //: base (Util.GS("iFolder Migration")) { // this.topLevelWindow = topWindow; this.Modal = false; //this.ifws = ifws; //this.simws = simws; this.iFolderName = ifolderName; curDomains = new Hashtable(); CreateWidgets(); PopulateWidgets(); }
private iFolderData() { Console.WriteLine("=====> iFolderData being constructed! <====="); Console.WriteLine("=====> iFolderData HashCode: {0} <=====", this.GetHashCode()); Console.WriteLine("Current Thread: {0}", System.Threading.Thread.CurrentThread.Name); Console.WriteLine("Stack Trace:"); Console.WriteLine(Environment.StackTrace); simiasManager = Util.GetSimiasManager(); try { ifws = new iFolderWebService(); ifws.Url = simiasManager.WebServiceUri.ToString() + "/iFolder.asmx"; LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath); } catch(Exception e) { ifws = null; throw new Exception("Unable to create ifolder web service"); } try { simws = new SimiasWebService(); simws.Url = simiasManager.WebServiceUri.ToString() + "/Simias.asmx"; LocalService.Start(simws, simiasManager.WebServiceUri, simiasManager.DataPath); } catch(Exception e) { simws = null; throw new Exception("Unable to create simias web service"); } domainController = DomainController.GetDomainController(); iFolderListStore = new ListStore(typeof(iFolderHolder)); ifolderIters = new Hashtable(); subToiFolderMap = new Hashtable(); if (domainController != null) { domainController.DomainAdded += new DomainAddedEventHandler(OnDomainAddedEvent); domainController.DomainDeleted += new DomainDeletedEventHandler(OnDomainDeletedEvent); } eventBroker = SimiasEventBroker.GetSimiasEventBroker(); if (eventBroker != null) { eventBroker.CollectionSyncEventFired += OniFolderSyncEvent; eventBroker.FileSyncEventFired += OniFolderFileSyncEvent; } Refresh(); }
/// <summary> /// Default constructor for iFolderPropSharingPage /// </summary> public PrefsGeneralPage(Gtk.Window topWindow, iFolderWebService webService) : base() { this.topLevelWindow = topWindow; this.ifws = webService; InitializeWidgets(); this.Realized += new EventHandler(OnRealizeWidget); // ClientConfig.SettingChanged += // new GConf.NotifyEventHandler(OnClientConfigChanged); }
/// <summary> /// Constructor /// </summary> /// <param name="ifws">iFolder WebService</param> /// <param name="simws">Simias WebService</param> public ExportKeysDialog(iFolderWebService ifws, SimiasWebService simws) { // // Required for Windows Form Designer support // InitializeComponent(); this.simiasWebService = simws; this.ifWebService = ifws; // // TODO: Add any constructor code after InitializeComponent call // }
/// <summary> /// Default constructor for iFolderPropSharingPage /// </summary> public iFolderPropSharingPage(Gtk.Window topWindow, iFolderWebService iFolderWS, SimiasWebService SimiasWS) : base() { this.ifws = iFolderWS; this.simws = SimiasWS; this.topLevelWindow = topWindow; curUsers = new Hashtable(); memberFullNames = new Hashtable(); duplicateMembers = new Hashtable(); InitializeWidgets(); }
public MigrateLocation(Gtk.Window parentWindow, string initialPath, iFolderWebService ifws) : base("", Util.GS("Select a folder..."), parentWindow, FileChooserAction.SelectFolder, Stock.Cancel, ResponseType.Cancel, Stock.Ok, ResponseType.Ok) { this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png")); this.initialPath = System.IO.Directory.GetCurrentDirectory(); this.copyDir = initialPath; this.ifws = ifws; keyReleasedTimeoutID = 0; if (this.initialPath != null && this.initialPath.Length > 0) this.SetCurrentFolder(this.initialPath); this.SetResponseSensitive(ResponseType.Ok, false); }
public iFolderPropSharingPage( Gtk.Window topWindow, iFolderWebService iFolderWS, SimiasWebService SimiasWS) : base() { this.ifws = iFolderWS; this.simws = SimiasWS; this.topLevelWindow = topWindow; curUsers = new Hashtable(); memberFullNames = new Hashtable(); duplicateMembers = new Hashtable(); InitializeWidgets(); }
static void Main() { iFolderWebService ifws; try { ifws = new iFolderWebService(); iFolderSettings ifSettings = ifws.GetSettings(); } catch(Exception e) { Console.WriteLine(e); } }
public AcceptInvitation(iFolderWebService ifolderWebService, iFolderWeb ifolder) { InitializeComponent(); this.ifWebService = ifolderWebService; this.ifolder = ifolder; int delta = calculateSize(label2, 0); if (delta > 0) { label2.Width += delta; int temp = iFolderLocation.Left; iFolderLocation.Left = label2.Left + label2.Width; iFolderLocation.Width -= iFolderLocation.Left - temp; } }
public CreateDialog(Gtk.Window parentWindow, DomainInformation[] domainArray, string filteredDomainID, string initialPath, iFolderWebService ifws) : base("", Util.GS("Create a new iFolder..."), parentWindow, FileChooserAction.CreateFolder, Stock.Cancel, ResponseType.Cancel, Stock.Ok, ResponseType.Ok) { domains = domainArray; this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder24.png")); this.initialPath = initialPath; this.ifws = ifws; keyReleasedTimeoutID = 0; if (this.initialPath != null && this.initialPath.Length > 0) this.SetCurrentFolder(this.initialPath); this.ExtraWidget = CreateMoreOptionsExpander(filteredDomainID); this.SetResponseSensitive(ResponseType.Ok, false); }
/// <summary> /// Constructor /// </summary> /// <param name="simws">SimiasWebService</param> /// <param name="ifws">iFolderWebService</param> public ResetPassphrase(SimiasWebService simws, iFolderWebService ifws) { // // Required for Windows Form Designer support // InitializeComponent(); this.simws = simws; this.ifws = ifws; GetLoggedInDomains(); // // TODO: Add any constructor code after InitializeComponent call // }
/// <summary> /// Constructor /// </summary> /// <param name="ifWebService">iFolderWebService</param> /// <param name="simiasWebService">SimiasWebService</param> public MigrationWindow(iFolderWebService ifWebService, SimiasWebService simiasWebService) { windowActive = false; this.ifWebService = ifWebService; this.simiasWebService = simiasWebService; // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // }
public DragCreateDialog(Gtk.Window parentWindow, DomainInformation[] domainArray, string defaultDomainID, string initialPath, iFolderWebService ifws) : base(Util.GS("Convert to an iFolder..."), parentWindow, DialogFlags.Modal | DialogFlags.DestroyWithParent | DialogFlags.NoSeparator, Stock.Help, ResponseType.Help, Stock.Cancel, ResponseType.Cancel, Stock.Ok, ResponseType.Ok) { domains = domainArray; this.defaultDomainID = defaultDomainID; this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png")); this.initialPath = initialPath; this.ifws = ifws; Widget widgets = SetupWidgets(); widgets.ShowAll(); this.VBox.Add(widgets); domainComboBox.Changed += new EventHandler(OnDomainChangedEvent); }
public PrefsAccountsPage( Gtk.Window topWindow ) : base() { this.topLevelWindow = topWindow; this.simiasManager = Util.GetSimiasManager(); string localServiceUrl = simiasManager.WebServiceUri.ToString(); ifws = new iFolderWebService(); ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath); this.simws = new SimiasWebService(); simws.Url = simiasManager.WebServiceUri.ToString() + "/Simias.asmx"; LocalService.Start(simws, simiasManager.WebServiceUri, simiasManager.DataPath); ClientUpgradeDialog = null; this.ClientUpgradeStatus = null; this.NewClientVersion = null; this.NewClientDomainID = null; curDomains = new Hashtable(); removedDomains = new Hashtable(); InitializeWidgets(); domainProviderUI = DomainProviderUI.GetDomainProviderUI(); domainController = DomainController.GetDomainController(); if (domainController != null) { domainController.DomainAdded += new DomainAddedEventHandler(OnDomainAddedEvent); domainController.DomainDeleted += new DomainDeletedEventHandler(OnDomainDeletedEvent); domainController.DomainLoggedIn += new DomainLoggedInEventHandler(OnDomainLoggedInEvent); domainController.DomainLoggedOut += new DomainLoggedOutEventHandler(OnDomainLoggedOutEvent); domainController.DomainActivated += new DomainActivatedEventHandler(OnDomainActivatedEvent); domainController.DomainInactivated += new DomainInactivatedEventHandler(OnDomainInactivatedEvent); domainController.NewDefaultDomain += new DomainNewDefaultEventHandler(OnNewDefaultDomainEvent); domainController.DomainInGraceLoginPeriod += new DomainInGraceLoginPeriodEventHandler(OnDomainInGraceLoginPeriodEvent); domainController.DomainClientUpgradeAvailable += new DomainClientUpgradeAvailableEventHandler(OnClientUpgradeAvailableEvent); } detailsDialogs = new Hashtable(); this.Realized += new EventHandler(OnRealizeWidget); }
/// <summary> /// Default constructor for iFolderWindow /// </summary> public PreferencesWindow(iFolderWebService webService, Manager simiasManager) : base(Util.GS("iFolder Preferences")) { if (webService == null) { throw new ApplicationException("iFolderWebServices was null"); } ifws = webService; InitializeWidgets(simiasManager); // Bind ESC and C-w to close the window ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); }
/// <summary> /// Constructs an iFolderComponent object. /// </summary> public iFolderComponent() { try { connectToWebService(); } catch (WebException e) { ifWebService = null; if (e.Status == WebExceptionStatus.ProtocolError) { LocalService.ClearCredentials(); } } catch { // Ignore. } }
public iFolderComponent() { System.Diagnostics.Debug.WriteLine("In iFolderComponent()"); try { connectToWebService(); } catch (WebException e) { ifWebService = null; if (e.Status == WebExceptionStatus.ProtocolError) { LocalService.ClearCredentials(); } } catch { } }
public static bool AdvancedConflictResolver(iFolderWebService ifWebService, iFolderWeb selectedItem) { const string assemblyName = @"lib\plugins\EnhancedConflictResolution.dll"; const string enhancedConflictResolverClass = "Novell.EnhancedConflictResolution.EnhancedConflictResolver"; const string showConflictResolverMethod = "Show"; System.Object[] args = new System.Object[3]; try { if (assemblyName != null) { Assembly idAssembly = Assembly.LoadFrom(assemblyName); if (idAssembly != null) { Type type = idAssembly.GetType(enhancedConflictResolverClass); if (null != type) { args[0] = ifWebService; args[1] = Application.StartupPath; args[2] = selectedItem; System.Object enhancedConflictResolver = Activator.CreateInstance(type, args); try { MethodInfo method = type.GetMethod(showConflictResolverMethod, Type.EmptyTypes); if (null != method) { method.Invoke(enhancedConflictResolver, null); return(true); } } catch (Exception) { } } } } } catch (Exception) { } return(false); }
public MigrationWizard(string User, string path, iFolderWebService ifws, SimiasWebService simws, MigrationWindow page, bool encrypted) : base(WindowType.Toplevel) { this.Title = Util.GS("iFolder Migration Assistant"); this.Resizable = false; this.WindowPosition = Gtk.WindowPosition.Center; this.location = path; prevLocation = ""; this.ifdata = iFolderData.GetData(); this.ifws = ifws; this.simws = simws; this.Uname = User; this.page = page; this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png")); this.alreadyEncrypted = encrypted; domainController = DomainController.GetDomainController(); WaitDialog = null; this.Add(CreateWidgets()); ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); SetUpButtons(); }
public iFolderPropertiesDialog( string ifolderID, Manager manager ) : base() { if (manager == null) return; this.simiasManager = manager; String localServiceUrl = simiasManager.WebServiceUri.ToString(); if (localServiceUrl == null) return; this.ifws = new iFolderWebService(); if(this.ifws == null) throw new ApplicationException( "Unable to obtain iFolderWebService"); this.ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(this.ifws, simiasManager.WebServiceUri, simiasManager.DataPath); this.simws = new SimiasWebService(); if (this.simws == null) throw new ApplicationException( "Unable to obtain SimiasWebService"); this.simws.Url = localServiceUrl + "/Simias.asmx"; LocalService.Start(this.simws, simiasManager.WebServiceUri, simiasManager.DataPath); try { this.ifolder = this.ifws.GetiFolder(ifolderID); } catch(Exception e) { throw new ApplicationException( "Unable to read the iFolder"); } this.HasSeparator = false; this.Modal = true; this.Title = Util.GS("iFolder Properties"); InitializeWidgets(); SetValues(); ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); }
private iFolderController() { string localServiceUrl = Simias.Client.Manager.LocalServiceUrl.ToString(); try { ifws = new iFolderWebService(); ifws.Url = localServiceUrl + "/iFolder.asmx"; LocalService.Start(ifws); } catch(Exception e) { ifws = null; throw new Exception("Unable to create ifolder web service in iFolderController"); } try { simws = new SimiasWebService(); simws.Url = localServiceUrl + "/Simias.asmx"; LocalService.Start(simws); } catch(Exception e) { simws = null; throw new Exception("Unable to create simias web service in iFolderController"); } keyediFolders = new Hashtable(); keyedSubscriptions = new Hashtable(); domainController = DomainController.GetDomainController(); if (domainController != null) { domainController.DomainLoggedIn += new DomainLoggedInEventHandler(OnDomainLoggedInEvent); domainController.DomainLoggedOut += new DomainLoggedOutEventHandler(OnDomainLoggedOutEvent); } }
public iFolderPropertiesDialog( Gtk.Window parent, iFolderWeb ifolder, iFolderWebService iFolderWS, SimiasWebService SimiasWS, Manager simiasManager) : base() { if(iFolderWS == null) throw new ApplicationException("iFolderWebService was null"); this.ifws = iFolderWS; if(SimiasWS == null) throw new ApplicationException("SimiasWebService was null"); this.simws = SimiasWS; this.simiasManager = simiasManager; try { this.ifolder = this.ifws.GetiFolder(ifolder.ID); } catch(Exception e) { throw new ApplicationException( "Unable to read the iFolder"); } this.Modal = false; this.TypeHint = Gdk.WindowTypeHint.Normal; this.HasSeparator = false; this.Title = string.Format("{0} {1}", ifolder.Name, Util.GS("Properties")); InitializeWidgets(); SetValues(); ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); }
public iFolderWindow(iFolderWebService webService, SimiasWebService SimiasWS, Manager simiasManager) : base(Util.GS("iFolder")) { if(webService == null) throw new ApplicationException("iFolderWebServices was null"); ifws = webService; simws = SimiasWS; this.simiasManager = simiasManager; ifdata = iFolderData.GetData(); serverGroups = new Hashtable(); serverGroupFilters = new Hashtable(); PropDialogs = new Hashtable(); ConflictDialogs = new Hashtable(); lastXPos = -1; lastYPos = -1; searchTimeoutID = 0; domainController = DomainController.GetDomainController(); bAvailableFoldersShowing = false; CreateWidgets(); RefreshiFolders(true); if (domainController != null) { domainController.DomainAdded += new DomainAddedEventHandler(OnDomainAddedEvent); domainController.DomainDeleted += new DomainDeletedEventHandler(OnDomainDeletedEvent); } }
public void NewiFolderWizard([MarshalAs(UnmanagedType.LPWStr)] string dllPath, [MarshalAs(UnmanagedType.LPWStr)] string path) { try { if (DisplayConfirmationEnabled) { NewiFolder newiFolder = new NewiFolder(); newiFolder.FolderName = path; newiFolder.LoadPath = dllPath; newiFolder.Show(); } } catch (WebException e) { if (e.Status == WebExceptionStatus.ConnectFailure) { ifWebService = null; } } catch {} }
public iFolderConflictDialog( Gtk.Window parent, iFolderWeb ifolder, iFolderWebService iFolderWS, SimiasWebService SimiasWS) : base() { this.Title = Util.GS("Resolve Conflicts"); if(iFolderWS == null) throw new ApplicationException("iFolderWebServices was null"); this.ifws = iFolderWS; this.simws = SimiasWS; this.ifolder = ifolder; this.HasSeparator = false; this.Resizable = true; this.Modal = true; if(parent != null) this.TransientFor = parent; conflictTable = new Hashtable(); InitializeWidgets(); EnableConflictControls(false); this.Realized += new EventHandler(OnRealizeWidget); ControlKeyPressed = false; KeyPressEvent += new KeyPressEventHandler(KeyPressHandler); KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler); oldFileName = null; }
private void connectToWebService() { if (ifWebService == null) { string windowName = "iFolder Services " + Environment.UserName; Novell.Win32Util.Win32Window window = Novell.Win32Util.Win32Window.FindWindow(null, windowName); if (window != null) { DateTime currentTime = DateTime.Now; if ((currentTime.Ticks - ticks) > delta) { ticks = currentTime.Ticks; RegistryKey regKey = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Novell\iFolder"); if (regKey != null) { string webServiceUri = regKey.GetValue("WebServiceUri") as string; string simiasDataPath = regKey.GetValue("SimiasDataPath") as string; if ((webServiceUri != null) && (simiasDataPath != null)) { ifWebService = new iFolderWebService(); ifWebService.Url = webServiceUri + "/iFolder.asmx"; LocalService.Start(ifWebService, new Uri(webServiceUri), simiasDataPath); } regKey.Close(); } } } else { throw new Exception("iFolder Client not running"); } } }
public static bool AdvancedConflictResolver( Gtk.Window parent, iFolderWeb ifolder, iFolderWebService iFolderWS, SimiasWebService SimiasWS ) { bool status = false; const string assemblyName = "plugins/EnhancedConflictResolution"; const string conflictClass = "Novell.EnhancedConflictResolution.iFolderEnhancedConflictDialog"; const string conflictShowAllMethod = "ShowAll"; const string conflictSetPosMethod = "SetPosition"; System.Object[] args = new System.Object[4]; System.Object[] setPosArgs = new System.Object[1]; try { Assembly idAssembly = Assembly.Load( assemblyName ); if ( idAssembly != null ) { Type type = idAssembly.GetType( conflictClass ); if( null != type ) { args[0] = parent; args[1] = ifolder; args[2] = iFolderWS; args[3] = SimiasWS; System.Object enhancedConflictObj = Activator.CreateInstance(type,args); MethodInfo method = type.GetMethod( conflictSetPosMethod ); setPosArgs[0] = WindowPosition.Center; method.Invoke( enhancedConflictObj, setPosArgs ); method = type.GetMethod( conflictShowAllMethod ); method.Invoke(enhancedConflictObj, null); status = true; } } } catch( Exception e ) { iFolderWindow.log.Info("Exception type {0} Message {1} StackTrace {2}", e.GetType(), e.Message, e.StackTrace ); } return status; }
public ResetPasswordDialog(SimiasWebService simiasws, iFolderWebService ifws) { this.simws= simiasws; this.ifws = ifws; SetupDialog(); }