示例#1
0
 public iFolderViewItem(iFolderHolder holder, iFolderViewGroup group, TreeIter iter, int maxWidth)
 {
     this.holder = holder;
        this.group = group;
        this.iter = iter;
        this.maxWidth = maxWidth;
        this.CanFocus = true;
        this.bSelected = false;
        this.bMouseIsHovering = false;
        this.ModifyBg(StateType.Normal, this.Style.Base(StateType.Normal));
        this.ModifyBase(StateType.Normal, this.Style.Base(StateType.Normal));
        currentName = "";
        currentLocation = "";
        currentStatus = "";
        domainController = DomainController.GetDomainController();
        LoadImages();
        SetPixbufs();
        this.Add(CreateWidgets());
        this.WidthRequest = this.maxWidth;
        this.Realized +=
     new EventHandler(OnWidgetRealized);
        TargetEntry[] targets =
     new TargetEntry[]
     {
      new TargetEntry ("text/ifolder-id", 0, (uint)iFolderWindow.DragTargetType.iFolderID)
     };
        this.DragDataGet += new DragDataGetHandler(HandleDragDataGet);
        Drag.SourceSet(this, Gdk.ModifierType.Button1Mask, targets, Gdk.DragAction.Move);
 }
 public PrefsAccountsPage( Gtk.Window topWindow )
     : base()
 {
     this.topLevelWindow = topWindow;
        this.simiasManager = Util.GetSimiasManager();
        this.simws = new SimiasWebService();
        simws.Url = simiasManager.WebServiceUri.ToString() +
      "/Simias.asmx";
        LocalService.Start(simws, simiasManager.WebServiceUri, simiasManager.DataPath);
        curDomains = new Hashtable();
        InitializeWidgets();
        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);
        }
        detailsDialogs = new Hashtable();
        this.Realized += new EventHandler(OnRealizeWidget);
 }
 public BonjourAccountDialog(Window parent, DomainInformation curDomain)
     : base(parent, curDomain)
 {
     ifdata = iFolderData.GetData();
        this.simiasManager = Util.GetSimiasManager();
        domainController = DomainController.GetDomainController();
        SetupDialog();
 }
 public EnterpriseAccountDialog(Window parent, DomainInformation curDomain)
     : base(parent, curDomain)
 {
     ifdata = iFolderData.GetData();
        domainController = DomainController.GetDomainController();
        bServerAddressChanged = false;
        bPasswordChanged = false;
        SetupDialog();
        this.Response +=
     new ResponseHandler(OnDialogResponse);
 }
示例#5
0
    public AddDomainThread(
 DomainController domainController,
 string serverName,
 string userName,
 string password,
 bool bRememberPassword,
 bool bSetAsDefault)
    {
        this.domainController = domainController;
           this.serverName = serverName;
           this.userName = userName;
           this.password = password;
           this.bRememberPassword = bRememberPassword;
           this.bSetAsDefault = bSetAsDefault;
           this.domain = null;
           this.e = null;
    }
 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);
 }
示例#7
0
 public AddAccountWizard(SimiasWebService simws)
     : base(WindowType.Toplevel)
 {
     this.Title = Util.GS("iFolder Account Assistant");
        this.Resizable = false;
        this.Modal = true;
        this.WindowPosition = Gtk.WindowPosition.Center;
        this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder24.png"));
        this.simws = simws;
        domainController = DomainController.GetDomainController();
        ConnectedDomain = null;
        WaitDialog = null;
        this.Add(CreateWidgets());
        ControlKeyPressed = false;
        KeyPressEvent += new KeyPressEventHandler(KeyPressHandler);
        KeyReleaseEvent += new KeyReleaseEventHandler(KeyReleaseHandler);
        SetUpButtons();
 }
示例#8
0
 public iFolderViewItem(iFolderHolder holder, iFolderViewGroup group, TreeIter iter, int maxWidth)
 {
     this.holder = holder;
        this.group = group;
        this.iter = iter;
        this.maxWidth = maxWidth;
        this.CanFocus = true;
        this.bSelected = false;
        this.bMouseIsHovering = false;
        this.ModifyBg(StateType.Normal, this.Style.Base(StateType.Normal));
        this.ModifyBase(StateType.Normal, this.Style.Base(StateType.Normal));
        currentName = "";
        currentLocation = "";
        currentStatus = "";
        domainController = DomainController.GetDomainController();
        LoadImages();
        SetPixbufs();
        this.Add(CreateWidgets());
        this.WidthRequest = this.maxWidth;
        this.Realized +=
     new EventHandler(OnWidgetRealized);
 }
示例#9
0
 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();
 }
示例#10
0
 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);
        }
 }
示例#11
0
 private void StartiFolder()
 {
     bool simiasRunning = false;
        CurrentState = iFolderAppState.Starting;
        iFolderAppStateChanged.WakeupMain();
        {
     simiasManager.Start();
     string localServiceUrl = simiasManager.WebServiceUri.ToString();
     ifws = new iFolderWebService();
     ifws.Url = localServiceUrl + "/iFolder.asmx";
     LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath);
     simws = new SimiasWebService();
     simws.Url = localServiceUrl + "/Simias.asmx";
     LocalService.Start(simws, simiasManager.WebServiceUri, simiasManager.DataPath);
     while(!simiasRunning)
     {
      try
      {
       ifws.Ping();
       simiasRunning = true;
      }
      catch(Exception)
      {
       simiasRunning = false;
      }
      if (forceShutdown)
      {
       QuitiFolder();
       return;
      }
      System.Threading.Thread.Sleep(10);
     }
        LogInit(simiasManager.DataPath);
     if (forceShutdown)
      QuitiFolder();
     else
     {
      try
      {
       simiasEventBroker = SimiasEventBroker.GetSimiasEventBroker();
       ifdata = iFolderData.GetData();
       domainController = DomainController.GetDomainController();
      }
      catch(Exception e)
      {
       Debug.PrintLine(e.Message);
       ifws = null;
      }
     }
        }
        CleanUpPassphrase();
        CurrentState = iFolderAppState.Running;
        iFolderAppStateChanged.WakeupMain();
 }
示例#12
0
 private bool ShowiFolderWindows()
 {
     if (domainController == null)
     domainController = DomainController.GetDomainController();
        if (domainController != null)
        {
     DomainInformation[] domains = domainController.GetDomains();
     if (domains.Length < 1)
     {
      ShowAddAccountWizard();
     }
     else
     {
      if(! (bool)ClientConfig.Get(ClientConfig.KEY_IFOLDER_WINDOW_HIDE))
       Util.LoadiFolderWindows();
      Debug.PrintLine("Showing the migration prompt");
      if( Util.ShowMigrationPrompt() )
      {
       string str = Mono.Unix.UnixEnvironment.EffectiveUser.HomeDirectory;
       if(System.IO.Directory.Exists(str+"/.novell/ifolder"))
       {
        string[] dirs;
        dirs = System.IO.Directory.GetDirectories(str+"/.novell/ifolder");
        if( dirs.Length > 2)
        {
     iFolderMsgDialog dlg = new iFolderMsgDialog( null, iFolderMsgDialog.DialogType.Info, iFolderMsgDialog.ButtonSet.OkCancel,
     Util.GS("Migration Alert"), Util.GS("There are 2.x iFolders on this machine.") , Util.GS("Do you want to migrate them?") );
     CheckButton dontShowAgain = new CheckButton(Util.GS("Don't show this message again"));
     dlg.ExtraWidget = dontShowAgain;
     int res = dlg.Run();
     dlg.Hide();
     dlg.Destroy();
     if( ((CheckButton)(dlg.ExtraWidget)).Active == true)
     {
      Debug.PrintLine("The check box is checked");
      Util.DontShowMigrationPrompt();
     }
     else
       Debug.PrintLine("The check box is not checked");
     if( res == (int)ResponseType.Ok)
     {
      MigrationWindow migrationWindow = new MigrationWindow( Util.GetiFolderWindow(), ifws, simws);
      migrationWindow.ShowAll();
     }
        }
       }
      }
     }
        }
        else
     Debug.PrintLine("DomainController instance is null");
        return false;
 }
示例#13
0
 public static DomainController GetDomainController()
 {
     lock (typeof(DomainController))
        {
     if (instance == null)
     {
      instance = new DomainController();
     }
     return instance;
        }
 }
示例#14
0
 public DomainLoginThread(DomainController domainController)
 {
     this.domainController = domainController;
        this.domainID = null;
        this.password = null;
        this.bSavePassword = false;
        this.authStatus = null;
 }
示例#15
0
 public DomainLoginThread(DomainController domainController,
  string domainID,
  string password,
  bool bSavePassword)
 {
     this.domainController = domainController;
        this.domainID = domainID;
        this.password = password;
        this.bSavePassword = bSavePassword;
        this.authStatus = null;
 }
示例#16
0
 private void StartiFolder()
 {
     bool simiasRunning = false;
        CurrentState = iFolderState.Starting;
        iFolderStateChanged.WakeupMain();
        if(ifws == null)
        {
     simiasManager.Start();
     string localServiceUrl = simiasManager.WebServiceUri.ToString();
     ifws = new iFolderWebService();
     ifws.Url = localServiceUrl + "/iFolder.asmx";
     LocalService.Start(ifws, simiasManager.WebServiceUri, simiasManager.DataPath);
     simws = new SimiasWebService();
     simws.Url = localServiceUrl + "/Simias.asmx";
     LocalService.Start(simws, simiasManager.WebServiceUri, simiasManager.DataPath);
     while(!simiasRunning)
     {
      try
      {
       ifws.Ping();
       simiasRunning = true;
      }
      catch(Exception e)
      {
       simiasRunning = false;
      }
      System.Threading.Thread.Sleep(10);
     }
     try
     {
      simiasEventBroker = SimiasEventBroker.GetSimiasEventBroker();
      ifdata = iFolderData.GetData();
      domainController = DomainController.GetDomainController();
     }
     catch(Exception e)
     {
      Console.WriteLine(e);
      ifws = null;
     }
        }
        CurrentState = iFolderState.Running;
        iFolderStateChanged.WakeupMain();
 }
示例#17
0
 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();
 }
示例#18
0
 public void UpdateToIconListView()
 {
     domainController = DomainController.GetDomainController();
                 DomainInformation[] domains = domainController.GetDomains();
        if( (domains.Length <= 0)
     || (!ifolderlistview.Visible && !iFoldersScrolledWindow.Visible)
     || (ifolderlistview.Visible && iFoldersScrolledWindow.Visible) )
     {
                         ShowIconView(false);
                  }
 }
示例#19
0
 private iFolderData()
 {
     simiasManager = Util.GetSimiasManager();
        try
        {
     Debug.PrintLine(String.Format("Url = {0}", simiasManager.WebServiceUri));
     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));
        iFolderListStore.SetSortFunc(
     0,
     new TreeIterCompareFunc(TreeModelSortFunction));
        iFolderListStore.SetSortColumnId(0, SortType.Ascending);
        ifolderIters = new Hashtable();
        deletediFolders = new Hashtable();
        if (domainController != null)
        {
     domainController.DomainAdded +=
      new DomainAddedEventHandler(OnDomainAddedEvent);
     domainController.DomainDeleted +=
      new DomainDeletedEventHandler(OnDomainDeletedEvent);
     domainController.DomainLoggedOut +=
      new DomainLoggedOutEventHandler(OnDomainLoggedOutEvent);
        }
        eventBroker = SimiasEventBroker.GetSimiasEventBroker();
        if (eventBroker != null)
        {
     eventBroker.CollectionSyncEventFired += OniFolderSyncEvent;
     eventBroker.FileSyncEventFired += OniFolderFileSyncEvent;
        }
 }
示例#20
0
 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);
        }
 }
示例#21
0
 public DomainAddedIdleHandler(string domainID,
  DomainController domainController)
 {
     this.domainID = domainID;
     this.domainController = domainController;
 }