Пример #1
0
        protected override NavBarPack EndGetNavBarPack()
        {
            ShellInfo shellInfo = null;

            if (this.shellServiceTask != null)
            {
                if (this.shellServiceTask.Wait(ShellClient.shellServiceTimeout))
                {
                    if (!base.LogException())
                    {
                        shellInfo = this.shellInfo;
                    }
                }
                else
                {
                    this.stopwatch.Stop();
                    ExTraceGlobals.WebServiceTracer.TraceInformation(0, 0L, string.Format("Timeout when calling Shell Service after {0}ms", this.stopwatch.ElapsedMilliseconds));
                    EcpEventLogConstants.Tuple_Office365NavBarCallServiceTimeout.LogEvent(new object[0]);
                }
            }
            if (shellInfo != null)
            {
                NavBarPack navBarPackFromInfo = NavBarClientBase.GetNavBarPackFromInfo(shellInfo, this.cultureName);
                ExTraceGlobals.WebServiceTracer.TraceInformation(0, 0L, string.Format("NavBarData acquired. SessionId: {0}, CorrelationId: {1}", navBarPackFromInfo.NavBarData.SessionID, navBarPackFromInfo.NavBarData.CorrelationID));
                navBarPackFromInfo.IsGeminiShellEnabled = true;
                navBarPackFromInfo.IsFresh = true;
                return(navBarPackFromInfo);
            }
            return(null);
        }
        protected override BposShellInfo ExecuteRequest(ShellServiceClient client, string cultureName, string userPrincipalName, string userPuid, AuthZClientInfo effectiveCaller, string trackingGuid)
        {
            ShellBaseFlight value = ShellBaseFlight.V15Parity;

            if (this.currentHeaderFlight == BposHeaderFlight.E16Gemini1)
            {
                value = ShellBaseFlight.V16;
            }
            else if (this.currentHeaderFlight == BposHeaderFlight.E16Gemini2)
            {
                value = ShellBaseFlight.V16G2;
            }
            ShellInfoRequest shellInfoRequest = new ShellInfoRequest
            {
                BrandId           = null,
                CultureName       = cultureName,
                CurrentMainLinkID = NavBarMainLinkID.Outlook,
                UserPrincipalName = userPrincipalName,
                UserPuid          = userPuid,
                WorkloadId        = WorkloadAuthenticationId.Exchange,
                TrackingGuid      = trackingGuid,
                ShellBaseFlight   = new ShellBaseFlight?(value),
                UserThemeId       = (this.isGemini ? this.userContext.Theme.FolderName : null)
            };

            shellInfoRequest.UserThemeId = null;
            ShellInfo shellInfo = client.GetShellInfo(shellInfoRequest);

            return(this.CreateBposShellInfo(shellInfo, effectiveCaller));
        }
Пример #3
0
 private void statusLinkLabel_Click(object sender, EventArgs e)
 {
     if (sender == statusSiteItem)
     {
         ShellInfo.ExecuteVerb(new ShellInfo.Verb(string.Empty, statusSiteItem.ToolTipText, null), Handle, true, string.Empty);
     }
     else if (sender == statusHelpLinkLabel)
     {
         ShellInfo.ExecuteVerb(new ShellInfo.Verb(string.Empty, statusSiteItem.ToolTipText.TrimEnd('/') + "/_layouts/roxority_UploadZen/default.aspx?doc=" + ((tabControl.SelectedTab == prepTabPage) ? "client_side_settings" : ((tabControl.SelectedTab == uploadTabPage) ? "uploading_multiple_files#s1" : "bulk_folder_uploads_server_side_zip_unzipping")), null), Handle, true, string.Empty);
     }
     else
     {
         ShellInfo.ExecuteVerb(new ShellInfo.Verb(string.Empty, statusSiteItem.ToolTipText + "/" + statusListItem.Text, null), Handle, true, string.Empty);
     }
 }
Пример #4
0
        public MainForm()
        {
            InitializeComponent();

            Text = string.Format("{0} v{1}", Text, new Version(Application.ProductVersion).Trim());
            Icon = Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location);

            _profileManager = new ProfileManager(DbName);
            _profileManager.Load();

            PopulateProfiles();

            //image/aspect getters
            olvColFilename.ImageGetter = x =>
            {
                var ext  = ((ProcessedFile)x).Info.Extension;
                var icon = ShellInfo.GetShellIcon(ext);

                if (!fileIconList.Images.ContainsKey(ext))
                {
                    fileIconList.Images.Add(ext, icon);
                }

                return(ext);
            };
            olvColFilename.AspectGetter = x => ((ProcessedFile)x).Info.Name;
            olvColFiletype.AspectGetter = x =>
            {
                var file        = ((ProcessedFile)x);
                var si          = new ShellFileInfo(file.Info.Extension);
                var defaultName = string.Format("{0} File", file.Info.Extension.TrimStart(new[] { '.' }).ToUpper());
                var fileType    = si.FileType == defaultName?string.Format("{0} File", file.Profile.Name) : si.FileType;

                return(fileType);
            };
            olvColProfile.AspectGetter      = x => ((ProcessedFile)x).Profile.Name;
            olvColSize.AspectGetter         = x => ((ProcessedFile)x).Info.Length;
            olvColModified.AspectGetter     = x => ((ProcessedFile)x).Info.LastWriteTime;
            olvColTotalLines.AspectGetter   = x => ((ProcessedFile)x).Stats.TotalLines;
            olvColEmptyLines.AspectGetter   = x => ((ProcessedFile)x).Stats.EmptyLines;
            olvColCommentLInes.AspectGetter = x => ((ProcessedFile)x).Stats.CommentedLines;
            olvColCodeLines.AspectGetter    = x => ((ProcessedFile)x).Stats.CodeLines;
            olvColDirectory.AspectGetter    = x => ((ProcessedFile)x).Info.DirectoryName;
        }
Пример #5
0
    void ShowUserShellData(string dataText)
    {
        ShellInfo shellInfo = JsonUtility.FromJson <ShellInfo>(dataText);

        msgInfo.text += "\r\n";
        msgInfo.text += "<color=#8c8a9a>Status</color>    " + shellInfo.status.ToString() + "\r\n";
        msgInfo.text += "<color=#8c8a9a>chkSeq</color>    " + chkSeq.ToString() + "\r\n";

        if (shellInfo.status == 200)
        {
            msgInfo.text += "<color=#8c8a9a>Token_addr</color>    " + shellInfo.data.token_addr + "\r\n";
            msgInfo.text += "<color=#8c8a9a>Amt_token</color>    " + shellInfo.data.amt_token.ToString() + "\r\n";
            msgInfo.text += "<color=#8c8a9a>Status</color>    " + shellInfo.data.status.ToString() + "\r\n";
        }
        else
        {
            msgInfo.text += "<color=#8c8a9a>Code</color>    " + shellInfo.error.code.ToString() + "\r\n";
            msgInfo.text += "<color=#8c8a9a>Message</color>    " + shellInfo.error.message + "\r\n";
        }
    }
        private BposShellInfo CreateBposShellInfo(ShellInfo info, AuthZClientInfo effectiveCaller)
        {
            if (info == null)
            {
                return(null);
            }
            try
            {
                if (base.ShouldUpdateCache(info.Version))
                {
                    NavBarData data = base.CreateNavBarData(info.NavBarDataJson);
                    base.UpdateCachedAssets(new BposShellInfo(info.Version, data, info.SuiteServiceProxyOriginAllowedList, info.SuiteServiceProxyScriptUrl));
                }
            }
            catch (Exception)
            {
            }
            NavBarData navBarData = base.CreateNavBarData(info.NavBarDataJson);

            base.UpdateAppsLinks(navBarData, effectiveCaller);
            return(new BposShellInfo(info.Version, navBarData, info.SuiteServiceProxyOriginAllowedList, info.SuiteServiceProxyScriptUrl));
        }
Пример #7
0
 void Start()
 {
     _shellStub = new ShellInfo(Damage, 0);
 }
Пример #8
0
 public static HandleRef getCPtr(ShellInfo obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }
Пример #9
0
 private void statusHelpLabel_Click(object sender, EventArgs e)
 {
     ShellInfo.ExecuteVerb(new ShellInfo.Verb(string.Empty, "http://roxority.com/UploadZen/", null), Handle, true, string.Empty);
 }