Ejemplo n.º 1
0
 public KwsSetUserProperty(WorkspaceManager wm, Workspace kws, UInt32 userId, String newPwd)
     : base(wm)
 {
     m_kws = kws;
     m_targetUserId = userId;
     m_stringParam = newPwd;
 }
Ejemplo n.º 2
0
 public BaseImportKwsOp(WorkspaceManager wm, KwsCredentials creds, String folderPath, bool joinFlag)
     : base(wm)
 {
     m_folderPath = folderPath;
     m_joinFlag = joinFlag;
     m_sh = new KwsSpawnOpHelper(this, creds);
 }
Ejemplo n.º 3
0
 public OutlookEventProxy(WorkspaceManager wm, Workspace kws)
 {
     m_Wm = wm;
     m_Kws = kws;
     Debug.Assert(m_Kws.EventProxy == null);
     m_Kws.EventProxy = this;
     m_Kws.OnEventReceived += EventReceivedHandler;
 }
Ejemplo n.º 4
0
 public OutlookWorkspaceSubscribeOp(WorkspaceManager wm, WmOutlookRequest request)
     : base(wm)
 {
     RegisterOutlookRequest(request);
 }
Ejemplo n.º 5
0
 public OutlookStartScreenShareOp(WorkspaceManager wm, WmOutlookRequest request)
     : base(wm)
 {
     RegisterOutlookRequest(request);
 }
Ejemplo n.º 6
0
 public KwmInviteOp(WorkspaceManager wm, Workspace kws, String invitees, bool skipFirstPageFlag)
     : base(wm, kws)
 {
     Invitees = invitees;
     SkipFirstPage = skipFirstPageFlag;
 }
Ejemplo n.º 7
0
 public OutlookInviteOp(WorkspaceManager wm, Workspace kws, WmOutlookRequest request)
     : base(wm, kws)
 {
     RegisterOutlookRequest(request);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Initialization code common to both the deserialized and
        /// non-deserialized cases. This method MUST be called explicitly
        /// when the object is deserialized. Note that deserialized
        /// applications are added to the application tree before this method
        /// is called. This method can throw.
        /// </summary>
        public void Initialize(WorkspaceManager wm)
        {
            m_wm = wm;
            Sm = new KwsStateMachine(wm, this);
            KasEventHandler = new KwsKasEventHandler(this);
            KasLoginHandler.SetRef(wm, this);

            // Create the missing applications when the workspace is created
            // or when some applications have not been deserialized properly.
            CreateMissingApp();

            // Create the workspace state directory.
            Directory.CreateDirectory(KwsRoamingStatePath);

            // Create the workspace state directory.
            Directory.CreateDirectory(KwsLocalStatePath);
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Set the reference to the WM and workspace.
 /// </summary>
 public void SetRef(WorkspaceManager wm, Workspace kws)
 {
     m_wm = wm;
     m_kws = kws;
 }
Ejemplo n.º 10
0
 public OutlookSkurlKwsOp(WorkspaceManager wm, WmOutlookRequest request)
     : base(wm, request, true)
 {
 }
Ejemplo n.º 11
0
 public OutlookNewKwsOp(WorkspaceManager wm, WmOutlookRequest request, bool publicKwsFlag)
     : base(wm)
 {
     m_publicKwsFlag = publicKwsFlag;
     RegisterOutlookRequest(request);
 }
Ejemplo n.º 12
0
 public KwsStateMachine(WorkspaceManager wm, Workspace kws)
 {
     m_wm = wm;
     m_kws = kws;
 }
Ejemplo n.º 13
0
        public KwsBrowser(WorkspaceManager wm)
        {
            m_wm = wm;

            // Create the root folder and the primary folder.
            RootNode = new KwsBrowserFolderNode("");
            RootNode.PermanentFlag = true;
            PrimaryFolder = AddFolder(RootNode, "My Teamboxes");
            PrimaryFolder.PermanentFlag = true;
        }
Ejemplo n.º 14
0
 public WmUiBroker(WorkspaceManager wm)
 {
     m_wm = wm;
     m_mainForm = new frmMain();
     m_trayMessage = new TrayMessage(wm);
     Browser = new KwsBrowser(wm);
 }
Ejemplo n.º 15
0
 public WmOutlookBroker(WorkspaceManager wm)
 {
     m_wm = wm;
     WmWinRegistry.OnRegistryWritten += new EventHandler(HandleOnRegistryWritten);
 }
Ejemplo n.º 16
0
 public KwsCoreOp(WorkspaceManager wm)
 {
     Wm = wm;
 }
Ejemplo n.º 17
0
 public WmStateMachine(WorkspaceManager wm)
 {
     m_wm = wm;
     m_wkb = new WmKcmBroker();
     m_kcm = new KasCommunicationManager(m_wkb, HandleKcmCompletion);
     m_wkb.Initialize(m_wm, m_kcm);
     m_wakeupTimer.TimerWakeUpCallback = HandleTimerWakeUp;
     m_lastSerializationDate = DateTime.Now;
 }
Ejemplo n.º 18
0
 public BaseNewKwsCoreOp(WorkspaceManager wm)
     : base(wm)
 {
     Creds.AdminFlag = true;
     m_sh = new KwsSpawnOpHelper(this, Creds);
     m_ih = new KwsInviteOpHelper(this, Creds);
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Non-deserializing constructor. This constructor can throw.
 /// </summary>
 public Workspace(WorkspaceManager wm, WmKas kas, UInt64 internalID, KwsCredentials creds)
 {
     Kas = kas;
     InternalID = internalID;
     CoreData.Credentials = creds;
     if (creds != null) Debug.Assert(Kas.KasID.CompareTo(creds.KasID) == 0);
     Initialize(wm);
     SetDirty();
 }
Ejemplo n.º 20
0
 public KwmCreateKwsOp(WorkspaceManager wm, KwsBrowserFolderNode parentNode, String kwsName)
     : base(wm)
 {
     m_parentNode = parentNode;
     Creds.KwsName = kwsName;
 }
Ejemplo n.º 21
0
 public BaseInviteOp(WorkspaceManager wm, Workspace kws)
     : base(wm)
 {
     m_kws = kws;
     m_ih = new KwsInviteOpHelper(this, m_kws.CoreData.Credentials);
 }
Ejemplo n.º 22
0
 public KwmImportKwsOp(WorkspaceManager wm, KwsCredentials creds, String folderPath, bool joinFlag)
     : base(wm, creds, folderPath, joinFlag)
 {
 }
Ejemplo n.º 23
0
 public OutlookLookupRecAddrOp(WorkspaceManager wm, WmOutlookRequest request)
     : base(wm)
 {
     KwsCredentials creds = new KwsCredentials();
     creds.SecureFlag = true;
     m_ih = new KwsInviteOpHelper(this, creds);
     m_ih.FillInviteParamsFromOutlookLookupRecCmd(request.Cmd);
     RegisterOutlookRequest(request);
 }
Ejemplo n.º 24
0
 public OutlookCreateKwsOp(WorkspaceManager wm, WmOutlookRequest request)
     : base(wm, request, false)
 {
 }
Ejemplo n.º 25
0
 public TrayMessage(WorkspaceManager wm)
 {
     m_wm = wm;
     InitializeComponent();
     InitShowProperties();
 }
Ejemplo n.º 26
0
 public OutlookJoinKwsOp(WorkspaceManager wm, WmOutlookRequest request)
     : base(wm, new KwsCredentials(), wm.UiBroker.Browser.PrimaryFolder.FullPath, true)
 {
     RegisterOutlookRequest(request);
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Substitute for the constructor to allow KCM to be created
 /// appropriately by the WM.
 /// </summary>
 public void Initialize(WorkspaceManager wm, KasCommunicationManager kcm)
 {
     m_wm = wm;
     m_kcm = kcm;
 }
Ejemplo n.º 28
0
        /// <summary>
        /// This method is called by the program initialization code to create
        /// an empty workspace manager or deserialize an existing one from disk.
        /// It returns null if the program should exit.
        /// </summary>
        public WorkspaceManager Spawn()
        {
            WorkspaceManager wm = null;

            // Open or create the database.
            OpenLocalDbIfRequired();

            // Fill the list of deserializers.
            FillDsrList();

            // Try to find a deserializer for the KWM.
            FindDeserializer();

            // We found a deserializer.
            if (KwmDsr != null)
            {
                // Try to deserialize.
                KwmDsr.Deserialize();

                // The deserialization failed completely or partially.
                if (KwmDsr.Status != KwmDeserializationStatus.Full)
                {
                    // Tell the user.
                    TellUserAboutDsrFailure();

                    // If the user doesn't want to recover, bail out.
                    if (!RecoverFlag) return null;

                    // Create the backup directory.
                    if (Directory.Exists(BackupPath)) Directory.Delete(BackupPath, true);
                    Directory.CreateDirectory(BackupPath);

                    // Backup the files.
                    KwmDsr.BackupState(BackupPath);
                }

                // The deserialization succeeded completely or partially.
                // We now have a deserialized WM instance.
                if (KwmDsr.Status != KwmDeserializationStatus.None)
                    wm = KwmDsr.WmDsr.Wm;
            }

            // We don't have a workspace manager. Create a new one.
            if (wm == null)
            {
                wm = new WorkspaceManager();
                wm.Initialize(LocalDb);
            }

            // Ask the workspace manager to clean up its state before
            // start up.
            wm.Sm.HandlePreStart();

            // If we didn't deserialize the KWM fully, or if we used an
            // obsolete deserializer, set everything dirty and serialize
            // everything to stabilize our state.
            if (KwmDsr == null ||
                KwmDsr.Status != KwmDeserializationStatus.Full ||
                !(KwmDsr is DbKwmDeserializer))
            {
                wm.Serialize(true);
            }

            // Clean up any cruft left by obsolete serializers.
            if (KwmDsr != null) KwmDsr.CleanUp();

            return wm;
        }