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);
 }
 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();
 }
Beispiel #4
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);
        }
 }
 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();
 }
 private void Register()
 {
     ifdata = iFolderData.GetData();
        simiasEventClient = new IProcEventClient(
      new IProcEventError( ErrorHandler), null);
        simiasEventClient.Register();
        simiasEventClient.SetEvent( IProcEventAction.AddNodeCreated,
     new IProcEventHandler( SimiasEventHandler ) );
        simiasEventClient.SetEvent( IProcEventAction.AddNodeChanged,
     new IProcEventHandler( SimiasEventHandler ) );
        simiasEventClient.SetEvent( IProcEventAction.AddNodeDeleted,
     new IProcEventHandler( SimiasEventHandler ) );
        simiasEventClient.SetEvent( IProcEventAction.AddCollectionSync,
     new IProcEventHandler( SimiasEventSyncCollectionHandler) );
        simiasEventClient.SetEvent( IProcEventAction.AddFileSync,
     new IProcEventHandler( SimiasEventSyncFileHandler) );
        simiasEventClient.SetEvent( IProcEventAction.AddNotifyMessage,
     new IProcEventHandler( SimiasEventNotifyHandler) );
        runEventThread = true;
        SEThread.Start();
 }
Beispiel #7
0
 public static iFolderData GetData()
 {
     lock (instanceLock)
        {
     if (instance == null)
     {
      instance = new iFolderData();
     }
     return instance;
        }
 }
Beispiel #8
0
 public iFolderDeleteHandler(string ifolderID, iFolderData ifdata)
 {
     this.ifolderID = ifolderID;
     this.ifdata = ifdata;
 }
Beispiel #9
0
 public iFolderAddHandler(iFolderHolder holder, iFolderData ifdata)
 {
     this.holder = holder;
     this.ifdata = ifdata;
 }
 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();
 }