Exemplo n.º 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="ifolder">iFolder Web Object</param>
        /// <param name="initialPath">Initial Path</param>
        /// <param name="merge">true if merge else false</param>
        public iFolderAcceptDialog(iFolderWeb ifolder, string initialPath, bool merge)
            : base("", "", null, FileChooserAction.SelectFolder, Stock.Cancel, ResponseType.Cancel)
        {
            if (!merge)
            {
                this.Title =
                    string.Format(Util.GS("Download \"{0}\" to..."), ifolder.Name);
            }
            else
            {
                this.Title =
                    string.Format(Util.GS("Merge \"{0}\" to..."), ifolder.Name);
            }
            this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));

            this.initialPath = initialPath;

            this.SelectMultiple = false;
            this.LocalOnly      = true;
            //this.CurrentName = ifolder.Name;

            if (this.initialPath != null && this.initialPath.Length > 0)
            {
                this.SetCurrentFolder(this.initialPath);
            }

            if (!merge)
            {
                this.AddButton(Util.GS("_Download"), ResponseType.Ok);
            }
            else
            {
                this.AddButton(Util.GS("_Merge"), ResponseType.Ok);
            }
        }
Exemplo n.º 2
0
        /// <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;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");
            itemID    = Request.QueryString.Get("Item");
            type      = Request.QueryString.Get("Type");

            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // data
                BindData();

                // image
                ItemImage.ImageUrl = String.Format("images/change-{0}.png", type.ToLower());

                // strings
                CloseButton.Text             = GetString("RETURN");
                HistoryPagging.LabelSingular = GetString("CHANGE");
                HistoryPagging.LabelPlural   = GetString("CHANGES");

                // view
                ViewState["Referrer"] = Request.UrlReferrer;
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // data
                BindData();

                // strings
                ChangePasswordLabel.Text    = GetString("CHANGEPASSWORD");
                CurrentPasswordLabel.Text   = GetString("CURRENTPASSWORD");
                NewPasswordLabel.Text       = GetString("NEWPASSWORD");
                VerifyNewPasswordLabel.Text = GetString("CONFIRMNEWPASSWORD");

                SaveButton.Text    = GetString("SAVE");
                CancelButton.Text  = GetString("CANCEL");
                PageSizeLabel.Text = GetString("PAGESIZE");

                ChangePassword.Checked = true;

                // view
                ViewState["Referrer"] = Request.UrlReferrer;
                Head.AddHelpLink("SETTINGS");
            }
            if (Request.QueryString.Get("Error") != "" && Request.QueryString.Get("Error") != null && Request.QueryString.Get("Error").IndexOf("UNSUPPORTEDCHAR") != -1)
            {
                Message.Text = rm.GetString("UNSUPPORTEDCHAR");
                return;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // data
                BindData();

                // strings
                string RAName = Request.QueryString.Get("RAName");
                if (!RAName.Equals(GetString("NONE")))
                {
                    Certificate.Text  = GetString("CERTIFICATE");
                    AcceptButton.Text = GetString("ACCEPT");
                }
                else
                {
                    AcceptButton.Text   = GetString("CREATE");
                    Certificate.Visible = false;
                    CertDetails.Visible = false;
                }
                DenyButton.Text = GetString("DENY");
            }
        }
Exemplo n.º 6
0
        /// <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);
        }
Exemplo n.º 7
0
        /// <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);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // strings
                CreateButton.Text = GetString("CREATE");
                CancelButton.Text = GetString("CANCEL");
                //Localization need to be enabled
                Encryption.Text    = GetString("ENCRYPTTHEIFOLDER");
                Encryption.ToolTip = GetString("ENCRYPTIONCONDITION");
                //ssl.Text = GetString("Secure Data Transfer");
                shared.Text                   = GetString("SHARABLE");
                shared.Checked                = true;
                shared.ToolTip                = GetString("SHARECONDITION");
                SelectLabel.Text              = GetString("SELECTRECOVERYAGENT");
                PassPhraseLabel.Text          = GetString("ENTERPASSPHRASE");
                VerifyPassPhraseLabel.Text    = GetString("REENTER_PASSPHRASE");
                VerifyPassPhraseLabel.Visible = VerifyPassPhraseText.Visible = false;
                RAList.Enabled                = false;
                PassPhraseText.Enabled        = false;
                ChangeStatus();

                // Pass this page information to create the help link
                Head.AddHelpLink(GetString("IFOLDERNEW"));
            }
        }
Exemplo n.º 9
0
 public iFolderHolder(iFolderWeb ifolder)
 {
     this.ifolder = ifolder;
        this.state = iFolderState.Initial;
        this.objectsToSync = 0;
        UpdateDisplayData();
 }
Exemplo n.º 10
0
        ///<summary>
        /// Display passphrase dialog
        ///</summary>
        ///<param name="path">Path of ifolder</param>
        ///<param name="domain_id">Id of the domain</param>
        ///<param name="encrypted">Enctypred or not</param>
        ///<returns>0 on success else 1</returns>
        private static int ShowPassPhraseDialog(string path, string domain_id, bool encrypted)
        {
            Console.WriteLine(" The corresponding c# file is called");
            if (!encrypted)
            {
                iFolderWeb newiFolder = ifws.CreateiFolderInDomain(path, domain_id);
                if (newiFolder != null)
                {
                    Console.WriteLine("Created iFolder");
                    return(0);
                }
                Console.WriteLine("Error creating iFolder");
                return(1);
            }
            bool passphraseSet = false;

            try
            {
                passphraseSet = simws.IsPassPhraseSet(domain_id);
            }
            catch (Exception ex)
            {
                // Unable to create iFolder. Need to login..
            }
            bool passPhraseEntered = false;

            if (passphraseSet == true)
            {
                bool   rememberOption = simws.GetRememberOption(domain_id);
                string passphrasecheck;
                passphrasecheck = simws.GetPassPhrase(domain_id);
                if (passphrasecheck == null || passphrasecheck == "")
                {
                    passPhraseEntered = ShowVerifyDialog(domain_id, simws);
                }
                else
                {
                    passPhraseEntered = true;
                }
            }
            else
            {
                passPhraseEntered = ShowEnterPassPhraseDialog(domain_id, simws);
            }
            if (passPhraseEntered == true)
            {
                iFolderWeb newiFolder = ifws.CreateiFolderInDomainEncr(path, domain_id, !encrypted, "BlowFish", simws.GetPassPhrase(domain_id));
                if (newiFolder != null)
                {
                    return(0);
                }
                else
                {
                    return(1);
                }
            }
//			string[] array = domainController.GetRAList( domain_id);
            return(0);
        }
Exemplo n.º 11
0
        /// <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);
        }
Exemplo n.º 12
0
 public iFolderAcceptDialog(iFolderWeb ifolder, string initialPath)
     : base()
 {
     this.Title =
     string.Format(Util.GS("Download \"{0}\"..."), ifolder.Name);
        this.SetDefaultSize (600, 500);
        this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder24.png"));
        this.ifolder = ifolder;
        this.initialPath = initialPath;
        VBox dialogBox = new VBox();
        dialogBox.Spacing = 10;
        dialogBox.BorderWidth = 10;
        dialogBox.Homogeneous = false;
        this.VBox.PackStart(dialogBox, true, true, 0);
        VBox detailBox = new VBox();
        dialogBox.PackStart(detailBox, false, false, 0);
        Label l = new Label(Util.GS("Details:"));
        l.Xalign = 0;
        detailBox.PackStart(l, false, false, 0);
        TextView tv = new TextView();
        tv.LeftMargin = 10;
        tv.RightMargin = 10;
        tv.Editable = false;
        tv.CursorVisible = false;
        TextBuffer buffer = tv.Buffer;
        buffer.Text = string.Format(Util.GS("Name: {0}\nShared by: {1}\nAccess: {2}"), ifolder.Name, ifolder.Owner, GetDisplayRights(ifolder.CurrentUserRights));
        ScrolledWindow sw = new ScrolledWindow();
        sw.ShadowType = Gtk.ShadowType.EtchedIn;
        sw.Add(tv);
        detailBox.PackStart(sw, false, false, 0);
        l = new Label(Util.GS("The iFolder will be downloaded into this folder:"));
        l.LineWrap = false;
        l.Xalign = 0; l.Yalign = 1;
        dialogBox.PackStart(l, false, false, 0);
        previewPath = new Label();
        previewPath.Xalign = 0; previewPath.Yalign = 0;
        previewPath.Wrap = true;
        dialogBox.PackStart(previewPath, false, false, 0);
        fileChooserWidget =
     new FileChooserWidget(FileChooserAction.SelectFolder, "");
        fileChooserWidget.SelectMultiple = false;
        fileChooserWidget.LocalOnly = true;
        fileChooserWidget.CurrentName = ifolder.Name;
        if (this.initialPath != null && this.initialPath.Length > 0)
     fileChooserWidget.SetCurrentFolder(this.initialPath);
        fileChooserWidget.SelectionChanged +=
     new EventHandler(OnFileChooserSelectionChanged);
        dialogBox.PackStart(fileChooserWidget, true, true, 0);
        this.VBox.ShowAll();
        this.AddButton(Stock.Cancel, ResponseType.Cancel);
        this.AddButton(Stock.Ok, ResponseType.Ok);
        if (this.initialPath != null && this.initialPath.Length > 0)
     this.SetResponseSensitive(ResponseType.Ok, true);
        else
     this.SetResponseSensitive(ResponseType.Ok, false);
 }
Exemplo n.º 13
0
        /// <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;
        }
Exemplo n.º 14
0
        /// <summary>
        /// Update iFolder
        /// </summary>
        /// <param name="ifolder">iFolder Web Object</param>
        public void UpdateiFolder(iFolderWeb ifolder)
        {
            this.ifolder = ifolder;
            if (this.ifolder.encryptionAlgorithm != null && this.ifolder.encryptionAlgorithm != "")
            {
                this.AddButton.Sensitive = false;
            }

            RefreshUserList();
            UpdateWidgets();
        }
Exemplo n.º 15
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");
            entryID   = Request.QueryString.Get("Entry");
            rm        = (ResourceManager)Application["RM"];
            // connection
            web = (iFolderWeb)Session["Connection"];
            iFolder ifolder = null;

            try
            {
                ifolder = web.GetiFolder(ifolderID);
            }
            catch (Exception)
            {
                Response.Redirect("iFolders.aspx?ErrorMsg=Member does not exist " + ifolderID);
            }
            if (ifolder == null)
            {
                Response.Redirect("iFolders.aspx?ErrorMsg=iFolder does not exist " + ifolderID);
            }

            // localization

            if (!IsPostBack)
            {
                EntryData.Columns[3].HeaderText = GetString("NAME");
                EntryData.Columns[4].HeaderText = GetString("DATE");
                EntryData.Columns[5].HeaderText = GetString("SIZE");
                EntryData.Columns[6].HeaderText = GetString("HISTORY");

                // Pass this page information to create the help link
                Head.AddHelpLink(GetString("BROWSE"));

                string EncryptionAlgorithm = ifolder.EncryptionAlgorithm;
                if (!(EncryptionAlgorithm == null || (EncryptionAlgorithm == String.Empty)))
                {
                    // It is an encrypted ifolder , Make the Members tab invisible
                    Tabs.MakeMembersLinkInvisible();
                }

                // this function will check whether an ifolder is encrypted or not, if yes, it will ask for passphrase
                // if passphrase matches , then the real page will be loaded.
                CheckForThePassPhrase();
            }
            else
            {
                entryID   = (string)ViewState["EntryID"];
                entryPath = (string)ViewState["EntryPath"];
                CheckForThePassPhrase();
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");

            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // strings
                UserPagging.LabelSingular   = GetString("USER");
                UserPagging.LabelPlural     = GetString("USERS");
                MemberPagging.LabelSingular = GetString("MEMBER");
                MemberPagging.LabelPlural   = GetString("MEMBERS");
                SearchButton.Text           = GetString("SEARCH");
                ShareButton.Text            = GetString("SHARE");
                CancelButton.Text           = GetString("CANCEL");

                // properties
                SearchPropertyList.Items.Add(new ListItem(GetString("FIRSTNAME"), SearchProperty.FirstName.ToString()));
                SearchPropertyList.Items.Add(new ListItem(GetString("LASTNAME"), SearchProperty.LastName.ToString()));
                SearchPropertyList.Items.Add(new ListItem(GetString("USERNAME"), SearchProperty.UserName.ToString()));

                //Default selecting UserName
                SearchPropertyList.SelectedIndex = 2;

                // members
                members = new Hashtable();
                ViewState["Members"] = members;

                // current members
                currentMembers = new Hashtable();
                ViewState["CurrentMembers"] = currentMembers;

                // search pattern
                ViewState["SearchPattern"] = null;

                // data
                BindData();
            }
            else
            {
                // members
                members = (Hashtable)ViewState["Members"];

                // current members
                currentMembers = (Hashtable)ViewState["CurrentMembers"];
            }
        }
Exemplo n.º 17
0
//		private static bool unitTested = false;

        public iFolderHolder(iFolderWeb ifolder)
        {
            this.ifolder       = ifolder;
            this.state         = iFolderState.Initial;
            this.objectsToSync = 0;
            UpdateDisplayData();

//			if (!unitTested)
//			{
//				UnitTest();
//				unitTested = true;
//			}
        }
Exemplo n.º 18
0
        /// <summary>
        /// Validate Page
        /// </summary>
        /// <param name="currentIndex">current index</param>
        internal override int ValidatePage(int currentIndex)
        {
            // TODO:
            bool status = false;

            System.Resources.ResourceManager resourceManager = new System.Resources.ResourceManager(typeof(CreateiFolder));
            if (this.CreateDefault.Checked == false)
            {
                status = true;
            }
            else if (upload)              // Create iFolder
            {
                if (ifws.GetLimitPolicyStatus(domainInfo.ID) == 1)
                {
                    iFolderWeb ifolder = null;
                    ifolder = CreateDefaultiFolder(this.sslCheckButton.Checked);
                    if (ifolder != null)
                    {
                        status = true;
                        this.simws.DefaultAccount(domainInfo.ID, ifolder.ID);
                    }
                }
                else
                {
                    MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("ifolderlimiterror"), resourceManager.GetString("errorTitle"), string.Empty, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
                    mmb.ShowDialog();
                    status = true;
                }
            }
            else                // Download iFolder
            {
                iFolderWeb ifolder = this.ifws.GetMinimaliFolder(this.defaultiFolderID, 1);
                if (ifolder != null)
                {
                    status = DownloadiFolder(ifolder);
                }
                else
                {
                    status = false;
                }
            }
            if (status == true)
            {
                return(base.ValidatePage(currentIndex));
            }
            else
            {
                return(currentIndex);
            }
        }
Exemplo n.º 19
0
 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;
        }
 }
Exemplo n.º 20
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, System.EventArgs e)
        {
            // query
            //ifolderID = Request.QueryString.Get("iFolder");

            // localization
            rm = (ResourceManager)Application["RM"];

            // check connection
            web = (iFolderWeb)Session["Connection"];

            if (!IsPostBack)
            {
            }
        }
Exemplo n.º 21
0
 public iFolderAcceptDialog(iFolderWeb ifolder, string initialPath)
     : base("", "", null, FileChooserAction.SelectFolder, Stock.Cancel, ResponseType.Cancel)
 {
     this.Title =
     string.Format(Util.GS("Download \"{0}\" to..."), ifolder.Name);
      this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder24.png"));
      this.ifolder = ifolder;
      this.initialPath = initialPath;
      this.SelectMultiple = false;
      this.LocalOnly = true;
      this.CurrentName = ifolder.Name;
      if (this.initialPath != null && this.initialPath.Length > 0)
       this.SetCurrentFolder(this.initialPath);
        this.AddButton(Util.GS("_Download"), ResponseType.Ok);
 }
Exemplo n.º 22
0
 public iFolderCreationDialog(iFolderWeb ifolder)
     : base()
 {
     this.Title = "";
        this.HasSeparator = false;
        this.Resizable = false;
        this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png"));
        Gdk.Pixbuf bigiFolder =
     new Gdk.Pixbuf(Util.ImagesPath("ifolder48.png"));
        Image folderImage = new Image(bigiFolder);
        VBox vbox = new VBox();
        vbox.BorderWidth = 10;
        vbox.Spacing = 10;
        HBox h = new HBox();
        h.Spacing = 12;
        folderImage.SetAlignment(0.5F, 0);
        h.PackStart(folderImage, false, false, 0);
        VBox vbox2 = new VBox();
        vbox2.Spacing = 10;
        Label l = new Label("<span weight=\"bold\" size=\"larger\">" +
     Util.GS("iFolder Created") +
     "</span>");
        l.LineWrap = false;
        l.UseMarkup = true;
        l.Selectable = false;
        l.Xalign = 0;
        l.Yalign = 0;
        vbox2.PackStart(l, false, false, 0);
        l = new Label(Util.GS("The folder you selected is now an iFolder.  To learn more about using iFolder and sharing iFolders with other users, see \"Managing iFolders\" in iFolder Help."));
        l.LineWrap = true;
        l.Xalign = 0;
        vbox2.PackStart(l, true, true, 0);
        h.PackEnd(vbox2, true, true, 0);
        vbox.PackStart(h);
        Alignment cbAlignment = new Alignment(1, 1, 1, 0);
        vbox.PackStart(cbAlignment, true, true, 0);
        cbutton =
     new CheckButton(Util.GS("Do not show this message again."));
        cbAlignment.Add(cbutton);
        vbox.ShowAll();
        this.VBox.Add(vbox);
        this.AddButton(Stock.Close, ResponseType.Ok);
        this.AddButton(Stock.Help, ResponseType.Help);
 }
Exemplo n.º 23
0
        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);
        }
Exemplo n.º 24
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");

            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                iFolder ifolder = web.GetiFolder(ifolderID);

                //Load this page only if passphrase was provided for the encrypted iFolder
                if (!IfDetailsEnabled())
                {
                    // Return to Browse page, if passphrase was not provided for that encrypted ifolder.

                    Response.Redirect(String.Format("Browse.aspx?iFolder={0}", ifolderID));
                }

                string EncryptionAlgorithm = ifolder.EncryptionAlgorithm;
                if (!(EncryptionAlgorithm == null || (EncryptionAlgorithm == String.Empty)))
                {
                    // It is an encrypted ifolder , Make the Members tab invisible
                    Tabs.MakeMembersLinkInvisible();
                }

                // data
                BindData();

                // strings
                PropertyEditLink.Text = GetString("EDIT");
                PolicyEditLink.Text   = GetString("EDIT");

                // links
                PropertyEditLink.NavigateUrl = "iFolderEdit.aspx?iFolder=" + ifolderID;
                PolicyEditLink.NavigateUrl   = "iFolderPolicyEdit.aspx?iFolder=" + ifolderID;
            }
        }
Exemplo n.º 25
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");
            entryID   = Request.QueryString.Get("Entry");

            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                if (!IfSearchEnabled())
                {
                    // Don't load this page , if passphrase was not provided for that encrypted ifolder.
                    Response.Redirect(String.Format("Browse.aspx?iFolder={0}&Entry={1}", ifolderID,
                                                    entryID));
                }

                iFolder ifolder             = web.GetiFolder(ifolderID);
                string  EncryptionAlgorithm = ifolder.EncryptionAlgorithm;
                if (!(EncryptionAlgorithm == null || (EncryptionAlgorithm == String.Empty)))
                {
                    // It is an encrypted ifolder , Make the Members tab invisible
                    Tabs.MakeMembersLinkInvisible();
                }

                // data
                BindData();

                // strings
                EntryPagging.LabelSingular = GetString("ITEM");
                EntryPagging.LabelPlural   = GetString("ITEMS");
                DeleteButton.Text          = GetString("DELETE");
            }
            else
            {
                entryID = (string)ViewState["EntryID"];
            }
        }
Exemplo n.º 26
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, System.EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");

            // localization
            rm = (ResourceManager)Application["RM"];

            // check connection
            web = (iFolderWeb)Session["Connection"];

            if (!IsPostBack)
            {
                BindData();

                // strings
                RemoveButton.Text = GetString("REMOVEMEMBERSHIP");
                DeleteButton.Text = GetString("DELETEIFOLDER");
            }
        }
Exemplo n.º 27
0
 /// <summary>
 /// Displays the Conflict Resolver 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>
 public void InvokeConflictResolverDlg([MarshalAs(UnmanagedType.LPWStr)] string dllPath, [MarshalAs(UnmanagedType.LPWStr)] string path)
 {
     try
     {
         iFolderWeb ifolder = ifWebService.GetiFolderByLocalPath(path);
         if (!iFolderComponent.AdvancedConflictResolver(ifWebService, ifolder))
         {
             ConflictResolver conflictResolver = new ConflictResolver();
             conflictResolver.iFolder           = ifolder;
             conflictResolver.iFolderWebService = ifWebService;
             conflictResolver.LoadPath          = dllPath;
             conflictResolver.Show();
         }
     }
     catch (Exception ex)
     {
         MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("conflictDialogError"), resourceManager.GetString("conflictErrorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
         mmb.ShowDialog();
     }
 }
Exemplo n.º 28
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");
            entryID   = Request.QueryString.Get("Entry");

            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            iFolder ifolder = web.GetiFolder(ifolderID);

            EncryptionAlgorithm = ifolder.EncryptionAlgorithm;
            EncryptionKey       = ifolder.EncryptionKey;

            if (!IsPostBack)
            {
                string PassPhrase = Session["SessionPassPhrase"] as string;
                if (PassPhrase == null)
                {
                    bool PPSet = web.IsPassPhraseSet();

                    if (PPSet && (EncryptionAlgorithm != null && EncryptionAlgorithm != String.Empty))
                    {
                        PassPhraseLabel.Visible = true;
                        PassPhraseText.Visible  = true;
                        PassPhraseLabel.Text    = GetString("ENTERPASSPHRASE");
                    }
                }
                // data
                BindData();

                // strings
                UploadButton.Text          = GetString("UPLOAD");
                CancelButton.Text          = GetString("CANCEL");
                OverWriteExistingFile.Text = GetString("TEXTOVERWRITE");
                OverWriteCheckbox.Checked  = true;
            }
        }
Exemplo n.º 29
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");

            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                iFolder ifolder = web.GetiFolder(ifolderID);
                HistoryData.Columns[2].HeaderText = GetString("NAME");
                HistoryData.Columns[3].HeaderText = GetString("ACTION");
                HistoryData.Columns[4].HeaderText = GetString("DATE/TIME");

                //Load this page only if passphrase was provided for the encrypted iFolder
                if (!IfHistoryEnabled())
                {
                    // Return to Browse page, if passphrase was not provided for that encrypted ifolder.

                    Response.Redirect(String.Format("Browse.aspx?iFolder={0}", ifolderID));
                }

                string EncryptionAlgorithm = ifolder.EncryptionAlgorithm;
                if (!(EncryptionAlgorithm == null || (EncryptionAlgorithm == String.Empty)))
                {
                    // It is an encrypted ifolder , Make the Members tab invisible
                    Tabs.MakeMembersLinkInvisible();
                }

                // data
                BindData();

                // strings
                HistoryPagging.LabelSingular = GetString("CHANGE");
                HistoryPagging.LabelPlural   = GetString("CHANGES");
            }
        }
Exemplo n.º 30
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");

            // connection
            web = (iFolderWeb)Session["Connection"];

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // data
                BindData();

                // strings
                SaveButton.Text   = GetString("SAVE");
                CancelButton.Text = GetString("CANCEL");
            }
        }
Exemplo n.º 31
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="web"></param>
        public WebSettings(iFolderWeb web)
        {
            string xml = web.GetSetting(Name);

            doc = new XmlDocument();

            try
            {
                doc.LoadXml(xml);
            }
            catch
            {
                // if the xml is not valid, reset the settings
            }

            // create the root element
            if (doc.FirstChild == null)
            {
                doc.AppendChild(doc.CreateElement(Name));
            }
        }
Exemplo n.º 32
0
        /// <summary>
        /// Page Init
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Init(object sender, EventArgs e)
        {
            // localization
            rm = (ResourceManager)Application["RM"];

            // connection
            web = (iFolderWeb)Session["Connection"];

            HttpCookie languageCookie = Request.Cookies["Language"];
            string     code           = null;

            // check language cookie
            if ((languageCookie != null) && (languageCookie.Value != null) &&
                (languageCookie.Value.Length > 0))
            {
                code = languageCookie.Value;
            }
            if (code == null)
            {
                code = "en";
            }

            // set the code
            try
            {
                Thread.CurrentThread.CurrentUICulture =
                    CultureInfo.CreateSpecificCulture(code);
            }

            catch (Exception ex)
            {
                log.Info(Context, ex, "Culture: {0}", code);
            }

            // check connection
            if (web == null)
            {
                Logout(GetString("LOGIN.LOSTSESSION"));
            }
        }
Exemplo n.º 33
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            // query
            ifolderID = Request.QueryString.Get("iFolder");

            // connection
            web = (iFolderWeb)Session["Connection"];

            remoteweb = new iFolderWeb();
            remoteweb.PreAuthenticate = true;
            remoteweb.Credentials     = web.Credentials;
            remoteweb.Url             = web.Url;

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // data
                MemberData.Columns[3].HeaderText = GetString("MEMBERS");
                MemberData.Columns[4].HeaderText = GetString("RIGHTS");
                MemberData.Columns[5].HeaderText = GetString("HISTORY");

                BindData();

                // url
                //AddButton.NavigateUrl = "Share.aspx?iFolder=" + ifolderID;

                // strings
                AddButton.Text              = GetString("ADD");
                RemoveButton.Text           = GetString("REMOVE");
                ReadOnlyButton.Text         = GetString("RIGHTS.READONLY");
                ReadWriteButton.Text        = GetString("RIGHTS.READWRITE");
                AdminButton.Text            = GetString("RIGHTS.ADMIN");
                OwnerButton.Text            = GetString("OWNER");
                MemberPagging.LabelSingular = GetString("MEMBER");
                MemberPagging.LabelPlural   = GetString("MEMBERS");
            }
        }
Exemplo n.º 34
0
        /// <summary>
        /// Constructs an AcceptInvitation object.
        /// </summary>
        /// <param name="ifolderWebService">The web service to use when processing the invitation.</param>
        /// <param name="ifolder">The iFolder to accept.</param>
        public AcceptInvitation(iFolderWebService ifolderWebService, iFolderWeb ifolder)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.ifWebService = ifolderWebService;
            this.ifolder      = ifolder;

            //iFolderLocation.Text = Subscription.DefaultRootPath;

            // Adjust the controls based on the length of the strings.
            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;
            }
        }
Exemplo n.º 35
0
        /// <summary>
        /// Page Load
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Page_Load(object sender, EventArgs e)
        {
            string ErrorMsg = Request.QueryString.Get("ErrorMsg");

            // connection
            web = (iFolderWeb)Session["Connection"];

            currentServerURL = String.Copy(web.Url);

            // localization
            rm = (ResourceManager)Application["RM"];

            if (!IsPostBack)
            {
                // strings
                iFolderData.Columns[4].HeaderText = GetString("NAME");
                iFolderData.Columns[5].HeaderText = GetString("DATE");
                iFolderData.Columns[6].HeaderText = GetString("OWNER");
                iFolderPagging.LabelSingular      = GetString("IFOLDER");
                iFolderPagging.LabelPlural        = GetString("IFOLDERS");
                NewiFolderLink.Text = GetString("NEWIFOLDER");
                //NewiFolderLink1.Text = GetString("NEWIFOLDER");
                RemoveMemberDeleteDisabled.Text = GetString("REMOVEMEMBERDELETE");
                RemoveMemberDeleteButton.Text   = GetString("REMOVEMEMBERDELETE");
                FirstSingleStick.Text           = "|";
                FirstSingleStick.Visible        = true;


                // data
                BindData();
            }
            if (ErrorMsg != null && ErrorMsg != String.Empty)
            {
                Message.Text = GetString("ENTRY.ENTRYINVALIDNAME");
                return;
            }
        }
 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);
 }
Exemplo n.º 37
0
 private void apply_Click(object sender, System.EventArgs e)
 {
     this.processChanges();
        try
        {
     connectToWebService();
     string id = currentiFolder.ID;
     currentiFolder = null;
     currentiFolder = ifWebService.GetiFolder(id);
        }
        catch (Exception ex)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderReadError"), resourceManager.GetString("errorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
        }
 }
 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);
 }
 public void UpdateiFolder(iFolderWeb theiFolder)
 {
     SettingsPage.UpdateiFolder(theiFolder);
        SharingPage.UpdateiFolder(theiFolder);
 }
Exemplo n.º 40
0
 private void nodeEvent(iFolderWeb ifolder, iFolderUser ifolderUser, string eventData)
 {
     try
        {
     if (ifolder != null)
     {
      currentiFolder = ifolder;
      showConflictMessage(ifolder.HasConflicts);
     }
     else if (ifolderUser != null)
     {
      ListViewItem lvi;
      lock (subscrHT)
      {
       lvi = (ListViewItem)subscrHT[ifolderUser.ID];
      }
      if (lvi != null)
      {
       ShareListMember slMember = (ShareListMember)lvi.Tag;
       slMember.iFolderUser = ifolderUser;
       lvi.Tag = slMember;
       updateListViewItem(lvi);
      }
      else if (eventData.Equals("NodeCreated"))
      {
       addiFolderUserToListView(ifolderUser);
      }
     }
     else
     {
      lock (subscrHT)
      {
       ListViewItem lvi = (ListViewItem)subscrHT[eventData];
       if (lvi != null)
       {
        lvi.Remove();
        subscrHT.Remove(eventData);
        lock (userIDHT)
        {
     ListViewItem lvitem = (ListViewItem)userIDHT[((ShareListMember)lvi.Tag).iFolderUser.UserID];
     if ((lvitem != null) && (subscrHT[((ShareListMember)lvitem.Tag).iFolderUser.ID] == null))
     {
      userIDHT.Remove(((ShareListMember)lvi.Tag).iFolderUser.UserID);
     }
        }
       }
      }
     }
        }
        catch
        {
        }
 }
Exemplo n.º 41
0
 protected iFolderHolder()
 {
     this.ifolder = null;
        this.state = iFolderState.Initial;
        this.objectsToSync = 0;
 }
 public void UpdateiFolder(iFolderWeb ifolder)
 {
     DomainController domainController = DomainController.GetDomainController();
        this.domain = domainController.GetDomain(ifolder.DomainID);
        this.ifolder = ifolder;
        if (ifolder.LastSyncTime == null || ifolder.LastSyncTime == "")
     LastSuccessfulSync.Text = Util.GS("N/A");
        else
     LastSuccessfulSync.Text = ifolder.LastSyncTime;
        FFSyncValue.Text = Util.GS("0");
        int syncInterval = 0;
        if (ifolder.EffectiveSyncInterval <= 0)
        {
     try
     {
      syncInterval = ifws.GetDefaultSyncInterval();
     }
     catch
     {}
        }
        else
        {
     syncInterval = ifolder.EffectiveSyncInterval;
        }
        if (syncInterval > 0)
        {
     syncInterval = syncInterval / 60;
        }
        SyncIntervalValue.Text = syncInterval + " " + Util.GS("minute(s)");
        string ifolderName = null, ifolderLocation = null;
        ifolderName = ifolder.Name;
        ifolderLocation = ifolder.UnManagedPath;
        if(ifolder.Name.Length > displayName)
        {
        ifolderName = ifolder.Name.Substring(0,displayName) + "..." ;
        }
        if(ifolder.UnManagedPath.Length > displayableLocation)
        {
        ifolderLocation = ifolder.UnManagedPath.Substring(0,displayableLocation) + "..." ;
        }
        NameLabel.Markup = string.Format("<span weight=\"bold\">{0}</span>", GLib.Markup.EscapeText(ifolderName));
        OwnerLabel.Markup = string.Format("<span size=\"small\">{0}</span>", GLib.Markup.EscapeText(ifolder.Owner));
        LocationLabel.Markup = string.Format("<span size=\"small\">{0}</span>", GLib.Markup.EscapeText(ifolderLocation));
        AccountLabel.Markup = string.Format("<span size=\"small\">{0}</span>", GLib.Markup.EscapeText(domain.Name));
        try
        {
     SyncSize ss = ifws.CalculateSyncSize(ifolder.ID);
     FFSyncValue.Text = string.Format("{0}", ss.SyncNodeCount);
        }
        catch(Exception)
        {
     FFSyncValue.Text = Util.GS("N/A");
        }
        try
        {
     ds = ifws.GetiFolderDiskSpace(ifolder.ID);
        }
        catch(Exception)
        {
     ds = null;
        }
     if(LimitLabel == null)
     {
      LimitLabel = new Label(Util.GS("Quota:"));
      LimitLabel.Xalign = 0;
      diskTable.Attach(LimitLabel, 0,1,1,2,
       AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
      LimitValue = new Label(Util.GS("0"));
      LimitValue.Xalign = 1;
      diskTable.Attach(LimitValue, 1,2,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitLabel.ShowAll();
      LimitValue.ShowAll();
     }
     else
     {
      LimitLabel.Visible = true;
      LimitValue.Visible = true;
     }
     if(LimitCheckButton != null)
     {
      LimitCheckButton.Visible = false;
      LimitEntry.Visible = false;
     }
        if(ds != null)
        {
     int tmpValue;
     if(ds.Limit == 0)
     {
      LimitUnit.Sensitive = false;
      AvailLabel.Sensitive = false;
      AvailValue.Sensitive = false;
      AvailUnit.Sensitive = false;
      DiskUsageBar.Sensitive = false;
      DiskUsageFrame.Sensitive = false;
      DiskUsageFullLabel.Sensitive = false;
      DiskUsageEmptyLabel.Sensitive = false;
      if(LimitCheckButton != null)
      {
       LimitCheckButton.Active = false;
       LimitEntry.Sensitive = false;
       LimitEntry.Text = Util.GS("0");
      }
      if(LimitLabel != null)
      {
       LimitLabel.Sensitive = false;
       LimitValue.Sensitive = false;
       LimitValue.Text = Util.GS("0");
      }
      AvailValue.Text = Util.GS("0");
     }
     else
     {
      LimitUnit.Sensitive = true;
      AvailLabel.Sensitive = true;
      AvailValue.Sensitive = true;
      AvailUnit.Sensitive = true;
      DiskUsageBar.Sensitive = true;
      DiskUsageFrame.Sensitive = true;
      DiskUsageFullLabel.Sensitive = true;
      DiskUsageEmptyLabel.Sensitive = true;
      if(LimitCheckButton != null)
      {
       LimitCheckButton.Active = true;
       LimitEntry.Sensitive = true;
       tmpValue = (int)(ds.Limit / (1024 * 1024));
       LimitEntry.Text = string.Format("{0}", tmpValue);
      }
      if(LimitLabel != null)
      {
       LimitLabel.Sensitive = true;
       LimitValue.Sensitive = true;
       tmpValue = (int)(ds.Limit / (1024 * 1024));
       LimitValue.Text = string.Format("{0}", tmpValue);
      }
      tmpValue = (int)(ds.AvailableSpace / (1024 * 1024));
      AvailValue.Text = string.Format("{0}",tmpValue);
     }
     SetGraph(ds.UsedSpace, ds.Limit);
     if(ds.UsedSpace == 0)
     {
      UsedValue.Text = Util.GS("0");
     }
     else
     {
      tmpValue = (int)(ds.UsedSpace / (1024 * 1024)) + 1;
      UsedValue.Text = string.Format("{0}", tmpValue);
     }
        }
        SecureSync.Active = ifolder.ssl;
                 if(ifolder.CurrentUserID != ifolder.OwnerID)
     SecureSync.Sensitive = false;
        if( domain.HostUrl.StartsWith( System.Uri.UriSchemeHttps ) )
        {
     SecureSync.Active = true;
                         SecureSync.Sensitive = false;
        }
 }
Exemplo n.º 43
0
 private void updateMenus(iFolderWeb ifolderWeb)
 {
     if (ifolderWeb == null)
        {
     menuShare.Visible = menuActionShare.Enabled = toolBarShare.Enabled =
      menuProperties.Visible = menuActionProperties.Enabled =
      menuRevert.Visible = menuActionRevert.Enabled =
      menuOpen.Visible = menuActionOpen.Enabled =
      menuSyncNow.Visible = menuActionSync.Enabled = toolBarSync.Enabled =
      menuSeparator1.Visible = menuSeparator2.Visible =
      menuResolve.Visible = menuActionResolve.Visible = toolBarResolve.Enabled =
      menuAccept.Visible = menuActionAccept.Visible = toolBarSetup.Enabled =
      menuActionSeparator2.Visible =
      menuRemove.Visible = menuActionRemove.Visible =
      menuActionSeparator2.Visible = false;
        }
        else
        {
     menuShare.Visible = menuActionShare.Enabled = toolBarShare.Enabled =
      menuProperties.Visible = menuActionProperties.Enabled =
      menuOpen.Visible = menuActionOpen.Enabled =
      menuSeparator1.Visible = menuSeparator2.Visible =
      !ifolderWeb.IsSubscription;
     menuRevert.Visible = menuActionRevert.Enabled =
      !ifolderWeb.IsSubscription && !ifolderWeb.Role.Equals("Master");
     if (ifolderWeb.IsSubscription)
     {
      menuSyncNow.Visible = menuActionSync.Enabled = toolBarSync.Enabled = false;
     }
     else
     {
      Domain selectedDomain = (Domain)servers.SelectedItem;
      if (!selectedDomain.ShowAll)
      {
       menuSyncNow.Visible = menuActionSync.Enabled = toolBarSync.Enabled = selectedDomain.DomainInfo.Active;
      }
      else
      {
       foreach (Domain d in servers.Items)
       {
        if (d.ID.Equals(ifolderWeb.DomainID))
        {
     menuSyncNow.Visible = menuActionSync.Enabled = toolBarSync.Enabled = d.DomainInfo.Active;
     break;
        }
       }
      }
     }
     menuResolve.Visible = menuActionResolve.Visible = toolBarResolve.Enabled = ifolderWeb.HasConflicts;
     menuAccept.Visible = menuActionAccept.Visible = toolBarSetup.Enabled =
      menuActionSeparator2.Visible = ifolderWeb.IsSubscription && ifolderWeb.State.Equals("Available");
     menuRemove.Visible = menuActionRemove.Visible =
      menuActionSeparator2.Visible = (!ifolderWeb.IsSubscription || ifolderWeb.State.Equals("Available"));
     if (menuRemove.Visible)
     {
      if (IsCurrentUser(ifolderWeb.OwnerID))
      {
       menuRemove.Text = menuActionRemove.Text =
        resourceManager.GetString("deleteAction");
      }
      else
      {
       menuRemove.Text = resourceManager.GetString("menuRemove.Text");
       menuActionRemove.Text = resourceManager.GetString("menuActionRemove.Text");
      }
     }
        }
        menuRefresh.Visible = menuCreate.Visible = iFolderView.SelectedItems.Count == 0;
 }
Exemplo n.º 44
0
 private iFolderHolder AddiFolder(iFolderWeb ifolder)
 {
     Console.WriteLine("AddiFolder()");
     Console.WriteLine(Environment.StackTrace);
        lock (instanceLock)
        {
     iFolderHolder ifHolder = null;
     if (ifolder.CollectionID == null)
     {
      Console.WriteLine("**** CollectionID is null ****");
     }
     else if (ifolder.ID == null)
     {
      Console.WriteLine("**** ID is null ****");
     }
     Console.WriteLine("\t1");
     string ifolderID =
      ifolder.IsSubscription ?
       ifolder.CollectionID :
       ifolder.ID;
     Console.WriteLine("\t{0}", ifolderID);
     if (ifolderIters.ContainsKey(ifolderID))
     {
     Console.WriteLine("\t3");
      TreeIter iter = (TreeIter)ifolderIters[ifolderID];
     Console.WriteLine("\t4");
      ifHolder = (iFolderHolder)
       iFolderListStore.GetValue(iter, 0);
     Console.WriteLine("\t5");
      if (ifHolder != null)
      {
     Console.WriteLine("\t6");
       ifHolder.iFolder = ifolder;
       TreePath path = iFolderListStore.GetPath(iter);
     Console.WriteLine("\t7");
       if (path != null)
       {
     Console.WriteLine("\t8");
        iFolderChangedHandler changedHandler =
     new iFolderChangedHandler(
      path, iter, iFolderListStore);
     Console.WriteLine("\t9");
        GLib.Idle.Add(changedHandler.IdleHandler);
       }
      }
      else
      {
     Console.WriteLine("*** SOMETHING WENT BAD IN iFolderData.AddiFolder() ***");
      }
     }
     else
     {
     Console.WriteLine("\t10");
      ifHolder = new iFolderHolder(ifolder);
     Console.WriteLine("\t11");
      iFolderAddHandler addHandler =
       new iFolderAddHandler(ifHolder, this);
     Console.WriteLine("\t12");
      GLib.Idle.Add(addHandler.IdleHandler);
     }
     Console.WriteLine("\t13");
     return ifHolder;
        }
 }
Exemplo n.º 45
0
 private void createChangeEvent(iFolderWeb ifolder, string eventData)
 {
     if (ifolder != null)
        {
     if (eventData.Equals("NodeCreated"))
     {
      if (IsSelected(ifolder.DomainID))
      {
       addiFolderToListView(new iFolderObject(ifolder, iFolderState.Normal));
       if (ifolder.State.Equals("Local"))
       {
        Win32Window.ShChangeNotify(Win32Window.SHCNE_UPDATEITEM, Win32Window.SHCNF_PATHW, ifolder.UnManagedPath, IntPtr.Zero);
       }
       if (!ifolder.IsSubscription)
       {
        lock (ht)
        {
     ListViewItem[] lvia = new ListViewItem[ht.Count];
     ht.Values.CopyTo(lvia, 0);
     foreach(ListViewItem lvi in lvia)
     {
      iFolderObject ifo = lvi.Tag as iFolderObject;
      if (ifo.iFolderWeb.IsSubscription &&
       (ifo.iFolderWeb.CollectionID == ifolder.CollectionID))
      {
       ht.Remove(ifo.iFolderWeb.ID);
       lvi.Remove();
       break;
      }
     }
        }
       }
      }
     }
     else
     {
      ListViewItem lvi;
      lock (ht)
      {
       lvi = (ListViewItem)ht[ifolder.ID];
      }
      if (lvi != null)
      {
       ((iFolderObject)lvi.Tag).iFolderWeb = ifolder;
       updateListViewItem(lvi);
      }
     }
        }
 }
Exemplo n.º 46
0
 private bool OnDefaultiFolderValidateClicked(object o, EventArgs args)
 {
     bool status = false;
        if( this.CreateDefault.Active == false)
        {
     status = true;
     return status;
        }
        string defaultiFolderID = simws.GetDefaultiFolder( ConnectedDomain.ID );
        if( defaultiFolderID == null || defaultiFolderID == "")
        {
     upload = true;
     status = CreateDefaultiFolder();
     return status;
        }
        else
        {
     upload = false;
     iFolderData ifdata = iFolderData.GetData();
     Debug.PrintLine("Reading ifdata");
     defaultiFolder = ifdata.GetDefaultiFolder( defaultiFolderID );
     if( defaultiFolder != null)
      status = DownloadiFolder();
     else
      Debug.PrintLine("iFolder object is null");
        }
        return status;
 }
Exemplo n.º 47
0
 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;
 }
Exemplo n.º 48
0
 public iFolderObject(iFolderWeb ifolderWeb, iFolderState ifolderState)
 {
     this.ifolderWeb = ifolderWeb;
        this.ifolderState = ifolderState;
 }
Exemplo n.º 49
0
 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;
 }
Exemplo n.º 50
0
 public void UpdateiFolder(iFolderWeb ifolder)
 {
     this.ifolder = ifolder;
        if( this.ifolder.encryptionAlgorithm != null && this.ifolder.encryptionAlgorithm != "")
     this.AddButton.Sensitive = false;
        RefreshUserList();
        UpdateWidgets();
 }
Exemplo n.º 51
0
 private void createChangeEvent(iFolderWeb ifolder, iFolderUser ifolderUser, string eventData)
 {
     try
        {
     if (ifolder.HasConflicts)
     {
      if (preferences.NotifyCollisionEnabled)
      {
       ifolderFromNotify = ifolder;
       string message = string.Format(resourceManager.GetString("collisionMessage"), ifolder.Name);
       notifyType = NotifyType.Collision;
       shellNotifyIcon.DisplayBalloonTooltip(resourceManager.GetString("actionRequiredTitle"), message, BalloonType.Info);
      }
     }
     else if (ifolder.State.Equals("Available") && eventData.Equals("NodeCreated"))
     {
      if (preferences.NotifyShareEnabled)
      {
       ifolderFromNotify = ifolder;
       string title = string.Format(resourceManager.GetString("subscriptionTitle"), ifolder.Name);
       string message = string.Format(resourceManager.GetString("subscriptionMessage"), ifolder.Owner);
       notifyType = NotifyType.Subscription;
       shellNotifyIcon.DisplayBalloonTooltip(title, message, BalloonType.Info);
      }
     }
     else if (ifolderUser != null)
     {
      if (preferences.NotifyJoinEnabled)
      {
       ifolderFromNotify = ifolder;
       string message = string.Format(resourceManager.GetString("newMemberMessage"),
        (ifolderUser.FN != null) && !ifolderUser.FN.Equals(string.Empty) ? ifolderUser.FN : ifolderUser.Name,
        ifolder.Name);
       notifyType = NotifyType.NewMember;
       shellNotifyIcon.DisplayBalloonTooltip(resourceManager.GetString("newMemberTitle"), message, BalloonType.Info);
      }
     }
        }
        catch {}
 }
Exemplo n.º 52
0
 public iFolderAcceptDialog(iFolderWeb ifolder, string initialPath)
     : this(ifolder, initialPath, false)
 {
 }
Exemplo n.º 53
0
 public void UpdateiFolder(iFolderWeb ifolder)
 {
     this.ifolder = ifolder;
        RefreshUserList();
        UpdateWidgets();
 }
 public void UpdateiFolder(iFolderWeb ifolder)
 {
     this.ifolder = ifolder;
        if (ifolder.LastSyncTime == null || ifolder.LastSyncTime == "")
     LastSuccessfulSync.Text = Util.GS("N/A");
        else
     LastSuccessfulSync.Text = ifolder.LastSyncTime;
        FFSyncValue.Text = "0";
        int syncInterval = 0;
        if (ifolder.SyncInterval <= 0)
        {
     try
     {
      syncInterval = ifws.GetDefaultSyncInterval();
     }
     catch
     {}
        }
        else
        {
     syncInterval = ifolder.SyncInterval;
        }
        if (syncInterval > 0)
        {
     syncInterval = syncInterval / 60;
        }
        SyncIntervalValue.Text = syncInterval + " " + Util.GS("minute(s)");
        NameLabel.Markup = string.Format("<span weight=\"bold\">{0}</span>", ifolder.Name);
        OwnerLabel.Markup = string.Format("<span size=\"small\">{0}</span>", ifolder.Owner);
        LocationLabel.Markup = string.Format("<span size=\"small\">{0}</span>", ifolder.UnManagedPath);
        try
        {
     SyncSize ss = ifws.CalculateSyncSize(ifolder.ID);
     FFSyncValue.Text = string.Format("{0}", ss.SyncNodeCount);
        }
        catch(Exception e)
        {
     FFSyncValue.Text = Util.GS("N/A");
        }
        try
        {
     ds = ifws.GetiFolderDiskSpace(ifolder.ID);
        }
        catch(Exception e)
        {
     ds = null;
        }
        if(ifolder.CurrentUserID == ifolder.OwnerID)
        {
     if(LimitCheckButton == null)
     {
      LimitCheckButton =
       new CheckButton(Util.GS("Set _Quota:"));
      LimitCheckButton.Toggled +=
     new EventHandler(OnLimitSizeButton);
      diskTable.Attach(LimitCheckButton, 0,1,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitEntry = new Entry();
      LimitEntry.Changed +=
       new EventHandler(OnLimitChanged);
      LimitEntry.Activated +=
       new EventHandler(OnLimitEdited);
      LimitEntry.FocusOutEvent +=
       new FocusOutEventHandler(OnLimitFocusLost);
      LimitEntry.WidthChars = 6;
      LimitEntry.MaxLength = 10;
      LimitEntry.Layout.Alignment = Pango.Alignment.Left;
      diskTable.Attach(LimitEntry, 1,2,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitCheckButton.ShowAll();
      LimitEntry.ShowAll();
     }
     else
     {
      LimitCheckButton.Visible = true;
      LimitEntry.Visible = true;
     }
     if(LimitLabel != null)
     {
      LimitLabel.Visible = false;
      LimitValue.Visible = false;
     }
        }
        else
        {
     if(LimitLabel == null)
     {
      LimitLabel = new Label(Util.GS("Quota:"));
      LimitLabel.Xalign = 0;
      diskTable.Attach(LimitLabel, 0,1,1,2,
       AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
      LimitValue = new Label("0");
      LimitValue.Xalign = 1;
      diskTable.Attach(LimitValue, 1,2,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitLabel.ShowAll();
      LimitValue.ShowAll();
     }
     else
     {
      LimitLabel.Visible = true;
      LimitValue.Visible = true;
     }
     if(LimitCheckButton != null)
     {
      LimitCheckButton.Visible = false;
      LimitEntry.Visible = false;
     }
        }
        if(ds != null)
        {
     int tmpValue;
     if(ds.Limit == 0)
     {
      LimitUnit.Sensitive = false;
      AvailLabel.Sensitive = false;
      AvailValue.Sensitive = false;
      AvailUnit.Sensitive = false;
      DiskUsageBar.Sensitive = false;
      DiskUsageFrame.Sensitive = false;
      DiskUsageFullLabel.Sensitive = false;
      DiskUsageEmptyLabel.Sensitive = false;
      if(LimitCheckButton != null)
      {
       LimitCheckButton.Active = false;
       LimitEntry.Sensitive = false;
       LimitEntry.Text = "0";
      }
      if(LimitLabel != null)
      {
       LimitLabel.Sensitive = false;
       LimitValue.Sensitive = false;
       LimitValue.Text = "0";
      }
      AvailValue.Text = "0";
     }
     else
     {
      LimitUnit.Sensitive = true;
      AvailLabel.Sensitive = true;
      AvailValue.Sensitive = true;
      AvailUnit.Sensitive = true;
      DiskUsageBar.Sensitive = true;
      DiskUsageFrame.Sensitive = true;
      DiskUsageFullLabel.Sensitive = true;
      DiskUsageEmptyLabel.Sensitive = true;
      if(LimitCheckButton != null)
      {
       LimitCheckButton.Active = true;
       LimitEntry.Sensitive = true;
       tmpValue = (int)(ds.Limit / (1024 * 1024));
       LimitEntry.Text = string.Format("{0}", tmpValue);
      }
      if(LimitLabel != null)
      {
       LimitLabel.Sensitive = true;
       LimitValue.Sensitive = true;
       tmpValue = (int)(ds.Limit / (1024 * 1024));
       LimitValue.Text = string.Format("{0}", tmpValue);
      }
      tmpValue = (int)(ds.AvailableSpace / (1024 * 1024));
      AvailValue.Text = string.Format("{0}",tmpValue);
     }
     SetGraph(ds.UsedSpace, ds.Limit);
     if(ds.UsedSpace == 0)
     {
      UsedValue.Text = "0";
     }
     else
     {
      tmpValue = (int)(ds.UsedSpace / (1024 * 1024)) + 1;
      UsedValue.Text = string.Format("{0}", tmpValue);
     }
        }
 }
Exemplo n.º 55
0
 private iFolderHolder AddiFolder(iFolderWeb ifolder)
 {
     lock (instanceLock)
        {
     iFolderHolder ifHolder = null;
     string ifolderID =
      ifolder.IsSubscription ?
       ifolder.CollectionID :
       ifolder.ID;
     if (ifolderIters.ContainsKey(ifolderID))
     {
      TreeIter iter = (TreeIter)ifolderIters[ifolderID];
      ifHolder = (iFolderHolder)
       iFolderListStore.GetValue(iter, 0);
      if (ifHolder != null)
      {
       ifHolder.iFolder = ifolder;
       TreePath path = iFolderListStore.GetPath(iter);
       if (path != null)
       {
        iFolderChangedHandler changedHandler =
     new iFolderChangedHandler(
      path, iter, iFolderListStore);
        GLib.Idle.Add(changedHandler.IdleHandler);
       }
      }
     }
     else
     {
      ifHolder = new iFolderHolder(ifolder);
      ifHolder.State = iFolderState.Initial;
      iFolderAddHandler addHandler =
       new iFolderAddHandler(ifHolder, this);
      GLib.Idle.Add(addHandler.IdleHandler);
     }
     return ifHolder;
        }
 }
Exemplo n.º 56
0
 private void ifolders_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (apply.Enabled)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("saveChanges"), resourceManager.GetString("saveChangesTitle"), string.Empty, MyMessageBoxButtons.YesNo, MyMessageBoxIcon.Question);
     if (DialogResult.Yes == mmb.ShowDialog())
     {
      processChanges();
     }
     else
     {
      apply.Enabled = false;
      if (removedList != null)
      {
       removedList.Clear();
      }
     }
        }
        try
        {
     connectToWebService();
     currentiFolder = ifWebService.GetiFolder(((iFolderInfo)ifolders.SelectedItem).ID);
     this.Text = string.Format(resourceManager.GetString("iFolderProperties"), Path.GetFileName(currentiFolder.UnManagedPath));
     refreshData();
        }
        catch (WebException ex)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderReadError"), resourceManager.GetString("errorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
     if (ex.Status == WebExceptionStatus.ConnectFailure)
     {
      ifWebService = null;
     }
        }
        catch (Exception ex)
        {
     MyMessageBox mmb = new MyMessageBox(resourceManager.GetString("iFolderReadError"), resourceManager.GetString("errorTitle"), ex.Message, MyMessageBoxButtons.OK, MyMessageBoxIcon.Error);
     mmb.ShowDialog();
        }
 }