public void VedleggTittelSkalSettesIManifestet()
            {
                //Arrange
                var resourceUtility = new ResourceUtility("Difi.SikkerDigitalPost.Klient.Tester.testdata");
                var dokument = new Dokument("hoved", resourceUtility.ReadAllBytes(true, "hoveddokument", "Hoveddokument.pdf"), "application/pdf");
                var vedleggTittel = "tittel";
                var vedlegg = new Dokument(vedleggTittel, resourceUtility.ReadAllBytes(true, "hoveddokument", "Hoveddokument.pdf"),
                    "application/pdf");

                var dokumentPakke = new Dokumentpakke(dokument);
                dokumentPakke.LeggTilVedlegg(vedlegg);

                var message = new Forsendelse(DomainUtility.GetAvsender(), DomainUtility.GetDigitalPostInfoSimple(), dokumentPakke, Prioritet.Normal, Guid.NewGuid().ToString());
                var asiceArkiv = DomainUtility.GetAsiceArchive(message);

                var manifestXml = new Manifest(message).Xml();
                var namespaceManager = new XmlNamespaceManager(manifestXml.NameTable);
                namespaceManager.AddNamespace("ns9", NavneromUtility.DifiSdpSchema10);
                namespaceManager.AddNamespace("ds", NavneromUtility.XmlDsig);
                //Act

                //Assert

                var vedleggNodeInnerText = manifestXml.DocumentElement.SelectSingleNode("//ns9:vedlegg", namespaceManager).InnerText;
                Assert.Equal(vedleggTittel, vedleggNodeInnerText);
            }
Exemplo n.º 2
0
        public JsonResult GetFileText(string str)
        {
            string fileText = null, errorMessage = null;
            int    id;

            try
            {
                if (int.TryParse(str, out id))
                {
                    fileText = ResourceUtility.GetFileTextForHtmlResource(id, out errorMessage);
                }
                else
                {
                    if (!System.IO.File.Exists(str))
                    {
                        errorMessage = string.Format("ERROR!! The file {0} does not exist!", str);
                    }
                    else
                    {
                        fileText = Utility.ReturnFileContents(str);
                    }
                }
            }
            catch (Exception e)
            {
                errorMessage = string.Format("ERROR!! An Exception occured in method GetFileText! e.Message:\r\n{0}", e.Message);
            }

            if (errorMessage == null)
            {
                return(Json(fileText, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(errorMessage, JsonRequestBehavior.AllowGet));
            }
        }
Exemplo n.º 3
0
    public void Initialize()
    {
        //IL_0028: Unknown result type (might be due to invalid IL or missing references)
        //IL_0085: Unknown result type (might be due to invalid IL or missing references)
        //IL_008f: Unknown result type (might be due to invalid IL or missing references)
        //IL_0094: Expected O, but got Unknown
        //IL_009f: Unknown result type (might be due to invalid IL or missing references)
        //IL_00a9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ae: Expected O, but got Unknown
        //IL_00b9: Unknown result type (might be due to invalid IL or missing references)
        //IL_00c3: Unknown result type (might be due to invalid IL or missing references)
        //IL_00c8: Expected O, but got Unknown
        //IL_011b: Unknown result type (might be due to invalid IL or missing references)
        Transform val = ResourceUtility.Realizes(loadedExploreMap_.loadedObject, base._transform, -1);

        val.set_localScale(new Vector3(0.3f, 0.3f, 1f));
        mapRoot_ = val.GetComponent <ExploreMapRoot>();
        ExploreMapLocation[] locations = mapRoot_.locations;
        spotsActive_   = (Transform[])new Transform[locations.Length];
        spotsInactive_ = (Transform[])new Transform[locations.Length];
        spotsSonar_    = (Transform[])new Transform[locations.Length];
        for (int i = 0; i < locations.Length; i++)
        {
            spotsActive_[i]   = locations[i].get_transform().FindChild("ExploreSpotActiveMini");
            spotsInactive_[i] = locations[i].get_transform().FindChild("ExploreSpotInactiveMini");
            spotsSonar_[i]    = locations[i].get_transform().FindChild("ExploreSpotSonarMini");
        }
        for (int j = 0; j < 4; j++)
        {
            playerMarkers_[j] = ResourceUtility.Realizes(loadedMarker_.loadedObject, base._transform, -1);
            ExplorePlayerMarkerMini component = playerMarkers_[j].GetComponent <ExplorePlayerMarkerMini>();
            component.SetIndex(j);
            playerMarkers_[j].get_gameObject().SetActive(false);
        }
        selfMarker_  = playerMarkers_[0];
        initialized_ = true;
    }
Exemplo n.º 4
0
		private void SendFiles(ISender sender, CommandContext context, IList<WaitHandle> waitHandles)
		{
			foreach(string arg in context.Expression.Arguments)
			{
				if(string.IsNullOrWhiteSpace(arg))
					continue;

				if(File.Exists(arg))
				{
					var waitHandle = this.SendFile(sender, context, arg);

					if(waitHandle != null)
						waitHandles.Add(waitHandle);
				}
				else if(Directory.Exists(arg))
				{
					var fileNames = Directory.GetFiles(arg);

					if(fileNames != null && fileNames.Length > 1)
						Array.Sort(fileNames, StringComparer.CurrentCulture);

					context.Output.WriteLine(ResourceUtility.GetString("${Text.Communication.SendCommand.PrepareSendFiles}"), arg, fileNames.Length);

					foreach(string fileName in fileNames)
					{
						var waitHandle = this.SendFile(sender, context, fileName);

						if(waitHandle != null)
							waitHandles.Add(waitHandle);
					}
				}
				else
				{
					context.Output.WriteLine(ResourceUtility.GetString("${Text.FileOrDirectoryNotExists}"), arg);
				}
			}
		}
Exemplo n.º 5
0
        /// <summary>
        /// 获取Splash图片
        /// </summary>
        /// <returns></returns>
        private async Task <IRandomAccessStream> GetSplashImageAsync()
        {
            try
            {
                var  lastCacheSplashFileName = Global.AppConfig.LastCacheSplashFileName; //缓存的Splash文件名称
                bool isSplashExpired         = false;                                    //Splash是否已过期

                if (Global.AppConfig.CacheSplashExpire.HasValue)
                {
                    if (Global.AppConfig.CacheSplashExpire < DateTime.Now)
                    {
                        isSplashExpired = true;
                        Global.AppConfig.CacheSplashExpire = null;  //清空过期时间
                        Global.SaveAppConfig();
                    }
                }

                IRandomAccessStream splashStream = null;
                if (isSplashExpired || string.IsNullOrWhiteSpace(lastCacheSplashFileName) || !(await LocalCacheUtility.ExistsCacheFile(lastCacheSplashFileName))) //没有缓存Splash,或者缓存已过期,或者缓存图片获取失败
                {
                    await LocalCacheUtility.DeleteCacheFile(lastCacheSplashFileName);

                    splashStream = await ResourceUtility.GetApplicationResourceStreamAsync("Assets/new_splash_content.png");
                }
                else
                {
                    splashStream = await LocalCacheUtility.GetCacheAsync(lastCacheSplashFileName);
                }

                return(splashStream);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                return(null);
            }
        }
Exemplo n.º 6
0
        public JsonResult SaveFileText(SaveFileTextData saveFileTextData)
        {
            int    id;
            string errorMessage = null;

            try
            {
                if (int.TryParse(saveFileTextData.Str, out id))
                {
                    ResourceUtility.UpdateFileTextAndTextareaDimensionForHtmlResource(saveFileTextData, out errorMessage);
                }
                else
                {
                    if (!System.IO.File.Exists(saveFileTextData.Str))
                    {
                        errorMessage = string.Format("ERROR!! The file {0} does not exist!", saveFileTextData.Str);
                    }
                    else
                    {
                        Utility.CreateNewFile(saveFileTextData.Str, saveFileTextData.Text.Replace("\n", "\r\n"));
                    }
                }
            }
            catch (Exception e)
            {
                errorMessage = string.Format("ERROR!! An Exception occured in method SaveFileText! e.Message:\r\n{0}", e.Message);
            }

            if (errorMessage == null)
            {
                return(Json("Success", JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(errorMessage, JsonRequestBehavior.AllowGet));
            }
        }
Exemplo n.º 7
0
        public static string CreateManifestName(string fileName, string rootNamespace)
        {
            var name = new StringBuilder();

            // Differences from the msbuild task:
            // - we do not include the name of the first class (if any) for binary resources or source code
            // - culture info is ignored

            if (rootNamespace != null && rootNamespace.Length > 0)
            {
                name.Append(rootNamespace).Append(".");
            }

            // Replace spaces in the directory name with underscores.
            // Note that spaces in the file name itself are preserved.
            var path = MakeValidIdentifier(Path.GetDirectoryName(fileName));

            // This is different from the msbuild task: we always append extensions because otherwise,
            // the emitted resource doesn't have an extension and it is not the same as in the classic
            // C# assembly
            if (ResourceUtility.IsResourceFile(fileName))
            {
                name.Append(Path.Combine(path, Path.GetFileNameWithoutExtension(fileName)));
                name.Append(".resources");
                name.Replace(Path.DirectorySeparatorChar, '.');
                name.Replace(Path.AltDirectorySeparatorChar, '.');
            }
            else
            {
                name.Append(Path.Combine(path, Path.GetFileName(fileName)));
                name.Replace(Path.DirectorySeparatorChar, '.');
                name.Replace(Path.AltDirectorySeparatorChar, '.');
            }

            return(name.ToString());
        }
Exemplo n.º 8
0
        protected override object OnExecute(CommandContext context)
        {
            var server = ServerCommandBase.GetServer(context.CommandNode) as TcpServer;

            if (server == null)
            {
                throw new CommandException(ResourceUtility.GetString("Text.CannotObtainCommandTarget", "Server"));
            }

            int channelId = -1;

            if (context.Expression.Options.TryGetValue("channel", out channelId))
            {
                if (channelId < 0)
                {
                    throw new CommandOptionValueException("channel", channelId.ToString());
                }

                //获取指定编号的通道对象
                var channel = server.ChannelManager.GetActivedChannel(channelId);

                //如果获取指定的通道失败或者获取到的通道为空闲状态,则抛出命令选项值异常
                if (channel == null || channel.IsIdled)
                {
                    throw new CommandException(string.Format("Can not obtain the actived channel by '#{0}' channel-id.", channelId));
                }

                //设置服务器的活动通道
                _channel = channel;

                //显示命令执行成功信息
                context.Output.WriteLine(ResourceUtility.GetString("${Text.CommandExecuteSucceed}"));
            }

            return(channelId);
        }
Exemplo n.º 9
0
        public static ICollection <IQueue> GetQueues(CommandTreeNode node, string names)
        {
            var    result = new List <IQueue>();
            IQueue queue;

            if (string.IsNullOrWhiteSpace(names))
            {
                queue = FindQueue(node);

                if (queue == null)
                {
                    throw new CommandException(ResourceUtility.GetString("Text.CannotObtainCommandTarget", "Queue"));
                }

                result.Add(queue);
            }
            else
            {
                foreach (var name in names.Split(',', ';'))
                {
                    if (!string.IsNullOrWhiteSpace(name))
                    {
                        queue = FindQueue(node, name);

                        if (queue == null)
                        {
                            throw new CommandException(ResourceUtility.GetString("Text.CannotObtainCommandTarget", $"Queue[{name}]"));
                        }

                        result.Add(queue);
                    }
                }
            }

            return(result);
        }
Exemplo n.º 10
0
        private void UpdateGUIParams()
        {
            try
            {
                var tag = GetTag(ResourceUtility.GetString("RtIntrisicSizeX"));
                if (tag != null)
                {
                    float sizeX = (float)GetValue(tag.Location);
                    numSizeX.Value = (decimal)sizeX;
                }

                tag = GetTag(ResourceUtility.GetString("RtIntrisicSizeY"));
                if (tag != null)
                {
                    float sizeY = (float)GetValue(tag.Location);
                    numSizeY.Value = (decimal)sizeY;
                }

                tag = GetTag(ResourceUtility.GetString("RtIntrisicUnit"));
                if (tag != null)
                {
                    int unit = (int)GetValue(tag.Location);
                    cbxUnit.SelectedIndex = (int)unit;
                }

                tag = GetTag(ResourceUtility.GetString("RtIntrisicShowGraphic"));
                if (tag != null)
                {
                    int show = (int)GetValue(tag.Location);
                    numShowGraphic.Value = (int)show;
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 11
0
        public void UpdateParam()
        {
            try
            {
                var tag = GetTag(ResourceUtility.GetString("RtInspPanelThreshold"));
                if (tag != null)
                {
                    float threshold = (float)GetValue(tag.Location);
                    nudPanelInspThreshold.Value = (decimal)threshold;
                }

                tag = GetTag(ResourceUtility.GetString("RtInspPanelShowgraphic"));
                if (tag != null)
                {
                    int showGraphic = (int)GetValue(tag.Location);
                    nudPanelInspShowGraphic.Value = (decimal)showGraphic;
                }

                tag = GetTag(ResourceUtility.GetString("RtInspTrayThreshold"));
                if (tag != null)
                {
                    float threshTray = (float)GetValue(tag.Location);
                    nudTrayInspThreshold.Value = (decimal)threshTray;
                }

                tag = GetTag(ResourceUtility.GetString("RtAlignmentPatmaxSorting"));
                if (tag != null)
                {
                    int iSort = (int)GetValue(tag.Location);
                    cbPatmaxSorting.SelectedIndex = iSort - 1;
                }
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 12
0
    private IEnumerator CreateTable()
    {
        LoadingQueue loadQueue       = new LoadingQueue(this);
        LoadObject   loadTablePoints = loadQueue.Load(RESOURCE_CATEGORY.SYSTEM, "SystemOutGame", new string[1]
        {
            "LoungeTablePoints"
        }, false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        Transform tablePoint = ResourceUtility.Realizes(loadTablePoints.loadedObject, this.get_transform(), -1);

        tablePoints = new List <TablePoint>(2);
        Utility.ForEach(tablePoint, delegate(Transform o)
        {
            if (o.GetComponent <TablePoint>() != null)
            {
                ((_003CCreateTable_003Ec__IteratorE5) /*Error near IL_00bf: stateMachine*/)._003C_003Ef__this.tablePoints.Add(o.GetComponent <TablePoint>());
            }
            return(false);
        });
    }
Exemplo n.º 13
0
    private IEnumerator CreateChair()
    {
        LoadingQueue loadQueue       = new LoadingQueue(this);
        LoadObject   loadChairPoints = loadQueue.Load(RESOURCE_CATEGORY.SYSTEM, "SystemOutGame", new string[1]
        {
            "LoungeChairPoints"
        }, false);

        if (loadQueue.IsLoading())
        {
            yield return((object)loadQueue.Wait());
        }
        Transform chairPoint = ResourceUtility.Realizes(loadChairPoints.loadedObject, this.get_transform(), -1);

        chairSitPoints = new List <ChairPoint>(8);
        Utility.ForEach(chairPoint, delegate(Transform o)
        {
            if (o.get_name().StartsWith("SIT"))
            {
                ((_003CCreateChair_003Ec__IteratorE6) /*Error near IL_00bf: stateMachine*/)._003C_003Ef__this.chairSitPoints.Add(o.GetComponent <ChairPoint>());
            }
            return(false);
        });
    }
Exemplo n.º 14
0
    protected void CheckAndReplaceShader(EnemyLoader enemyLoader)
    {
        Shader val = null;

        if (enemyLoader.bodyID == 2023)
        {
            val = ResourceUtility.FindShader("mobile/Custom/enemy_reflective_simple");
        }
        if (val != null)
        {
            enemyLoader.body.GetComponentsInChildren <Renderer>(Temporary.rendererList);
            for (int i = 0; i < Temporary.rendererList.Count; i++)
            {
                Renderer val2 = Temporary.rendererList[i];
                if (val2 is MeshRenderer || val2 is SkinnedMeshRenderer)
                {
                    for (int j = 0; j < val2.get_materials().Length; j++)
                    {
                        val2.get_materials()[j].set_shader(val);
                    }
                }
            }
        }
    }
Exemplo n.º 15
0
        private void btnDone_Click(object sender, EventArgs e)
        {
            try
            {
                if (!chxEnable.Checked)
                {
                    if (MessageBox.Show("Do you want to enable this function?", "Information", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
                    {
                        string nameTag = string.Format("RtInsp{0}Enable", mFinderTypeName);
                        var    tag     = GetTag(ResourceUtility.GetString(nameTag));
                        if (tag != null)
                        {
                            InsightSetValue(tag.Location, true);
                        }
                        chxEnable.Checked = true;
                    }
                }

                SettingDoneEvent.BeginInvoke(null, null, null, null);
            }
            catch (CvsException ex)
            {
            }
        }
    public static Transform Realizes(Object obj, int layer = -1)
    {
        //IL_0043: Unknown result type (might be due to invalid IL or missing references)
        //IL_0048: Expected O, but got Unknown
        GameObject val = obj as GameObject;

        if (val == null)
        {
            return(null);
        }
        GameObject val2 = ResourceUtility.Instantiate <GameObject>(val);
        string     name = val2.get_name();

        name = ResourceName.Normalize(name);
        name = name.Replace("(Clone)", string.Empty);
        val2.set_name(name);
        Transform val3 = val2.get_transform();

        if (layer != -1)
        {
            Utility.SetLayerWithChildren(val3, layer);
        }
        return(val3);
    }
Exemplo n.º 17
0
        public static bool GenerateNonCultureResources(Project project, List <CompilerUtility.NonCultureResgenIO> resgenFiles, IList <string> diagnostics)
        {
            foreach (var resgenFile in resgenFiles)
            {
                if (ResourceUtility.IsResxFile(resgenFile.InputFile))
                {
                    var outputResourceFile = ResourceFile.Create(resgenFile.OutputFile);

                    if (outputResourceFile.Type != ResourceFileType.Resources)
                    {
                        diagnostics.Add("Resource output type not supported");
                        return(false);
                    }

                    using (var outputStream = outputResourceFile.File.Create())
                    {
                        var resourceSource = new ResourceSource(ResourceFile.Create(resgenFile.InputFile), resgenFile.InputFile);
                        ResourceFileGenerator.Generate(resourceSource.Resource, outputStream);
                    }
                }
            }

            return(true);
        }
    public virtual void Initialize(FieldMapTable.GatherPointTableData point_data)
    {
        //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
        //IL_010b: Unknown result type (might be due to invalid IL or missing references)
        pointData = point_data;
        viewData  = Singleton <FieldMapTable> .I.GetGatherPointViewData(pointData.viewID);

        if (viewData == null)
        {
            Log.Error(LOG.INGAME, "GatherPointObject::Initialize() viewData is null. pointID = {0}, viewID = {1}", pointData.pointID, pointData.viewID);
        }
        else
        {
            if (viewData.viewID != 0)
            {
                LoadObject loadObject = MonoBehaviourSingleton <InGameProgress> .I.gatherPointModelTable.Get(viewData.viewID);

                modelView = ResourceUtility.Realizes(loadObject.loadedObject, _transform, -1);
            }
            if (!string.IsNullOrEmpty(viewData.gatherEffectName))
            {
                gatherEffect = EffectManager.GetEffect(viewData.gatherEffectName, _transform);
            }
            if (viewData.colRadius > 0f)
            {
                SphereCollider val = this.get_gameObject().AddComponent <SphereCollider>();
                val.set_center(new Vector3(0f, 0f, 0f));
                val.set_radius(viewData.colRadius);
            }
            if (MonoBehaviourSingleton <StageObjectManager> .IsValid())
            {
                self = MonoBehaviourSingleton <StageObjectManager> .I.self;
            }
            CheckGather();
        }
    }
Exemplo n.º 19
0
        public static string GetResourceFileMetadataName(Project project, KeyValuePair <string, string> resourceFile)
        {
            string resourceName  = null;
            string rootNamespace = null;

            string root         = PathUtility.EnsureTrailingSlash(project.ProjectDirectory);
            string resourcePath = resourceFile.Key;

            if (string.IsNullOrEmpty(resourceFile.Value))
            {
                //  No logical name, so use the file name
                resourceName  = ResourceUtility.GetResourceName(root, resourcePath);
                rootNamespace = project.Name;
            }
            else
            {
                resourceName  = ResourceManifestName.EnsureResourceExtension(resourceFile.Value, resourcePath);
                rootNamespace = null;
            }

            var name = ResourceManifestName.CreateManifestName(resourceName, rootNamespace);

            return(name);
        }
Exemplo n.º 20
0
        private void DisplayTcpServerInfo(TcpServer server, ICommandOutlet output, IChannel activeChannel)
        {
            this.DisplayListenerInfo(server, output);

            if (!server.IsListening)
            {
                return;
            }

            output.WriteLine();
            output.Write(CommandOutletColor.DarkMagenta, "ID\t");
            output.Write(CommandOutletColor.DarkMagenta, ResourceUtility.GetString("${LastReceivedTime}") + "\t\t");
            output.Write(CommandOutletColor.DarkMagenta, ResourceUtility.GetString("${LastSendTime}") + "\t\t");
            output.Write(CommandOutletColor.DarkMagenta, ResourceUtility.GetString("${LocalEndPoint}") + "\t\t");
            output.WriteLine(CommandOutletColor.DarkMagenta, ResourceUtility.GetString("${RemoteEndPoint}") + "\t");

            var channels = server.ChannelManager.GetActivedChannels();

            foreach (TcpServerChannel channel in channels)
            {
                if (channel == activeChannel)
                {
                    output.Write(CommandOutletColor.Magenta, "* ");
                }

                output.WriteLine(
                    "{0}\t{1:yyyy-MM-dd HH:mm:ss}\t{2:yyyy-MM-dd HH:mm:ss}\t{3}\t\t{4}",
                    channel.ChannelId,
                    channel.LastReceivedTime,
                    channel.LastSendTime,
                    channel.LocalEndPoint,
                    channel.RemoteEndPoint);
            }

            output.WriteLine();
        }
Exemplo n.º 21
0
        protected override object OnExecute(CommandContext context)
        {
            var server = ServerCommandBase.GetServer(context.CommandNode);

            if (server == null)
            {
                throw new CommandException(ResourceUtility.GetString("Text.CannotObtainCommandTarget", "Server"));
            }

            if (server is TcpServer)
            {
                this.DisplayTcpServerInfo((TcpServer)server, context.Output, this.GetActiveChannel(context.CommandNode));
            }
            else if (server is Net.FtpServer)
            {
                this.DisplayFtpServerInfo((FtpServer)server, context.Output);
            }
            else
            {
                this.DisplayListenerInfo(server, context.Output);
            }

            return(server.IsListening);
        }
Exemplo n.º 22
0
    private IEnumerator DoLoadBackgoundImage(int image_id)
    {
        isLoadingBackgoundImage = true;
        UnloadStage();
        LoadingQueue load_queue = new LoadingQueue(this);

        ResourceManager.enableCache = false;
        LoadObject lo_bg  = load_queue.Load(RESOURCE_CATEGORY.STAGE_IMAGE, "BackgroundImage", false);
        LoadObject lo_tex = load_queue.Load(RESOURCE_CATEGORY.STAGE_IMAGE, ResourceName.GetBackgroundImage(image_id), false);

        ResourceManager.enableCache = true;
        if (load_queue.IsLoading())
        {
            yield return((object)load_queue.Wait());
        }
        Transform bg = ResourceUtility.Realizes(lo_bg.loadedObject, base._transform, 0);

        bg.get_gameObject().GetComponent <MeshRenderer>().get_material()
        .set_mainTexture(lo_tex.loadedObject as Texture);
        bg.get_gameObject().AddComponent <FixedViewQuad>();
        backgroundImageID       = image_id;
        backgroundImage         = bg;
        isLoadingBackgoundImage = false;
    }
Exemplo n.º 23
0
		private void Sender_Failed(object sender, ChannelFailureEventArgs e)
		{
			var token = (SendToken)e.AsyncState;
			int index = Interlocked.Increment(ref _totalCount);
			Interlocked.Increment(ref _failedCount);

			try
			{
				//同步锁定,以防止异步并发中导致显示信息错位
				Monitor.Enter(_syncRoot);

				token.Context.Output.Write(CommandOutletColor.DarkYellow, "[{0}] ", index);
				token.Context.Output.Write(CommandOutletColor.DarkRed, ResourceUtility.GetString("${Text.Communication.SendCommand.SendFailed}"), token.Message);
				token.Context.Output.WriteLine(CommandOutletColor.DarkGray, ResourceUtility.GetString("${Text.Communication.SendCommand.Channel}"), e.Channel.ChannelId, e.Channel.LastSendTime);
			}
			finally
			{
				//退出同步锁定
				Monitor.Exit(_syncRoot);

				//设置信号量为非堵塞
				token.WaitHandle.Set();
			}
		}
    private IEnumerator DoInitialize()
    {
        SkillItemInfo skillItemInfo = resultData.itemData as SkillItemInfo;

        magiLoader = new GameObject("magimodel").AddComponent <ItemLoader>();
        int wait3 = 1;

        magiLoader.LoadSkillItem(skillItemInfo.tableID, magiLoader.get_transform(), magiLoader.get_gameObject().get_layer(), delegate
        {
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003C_003Ef__this.magiLoader.nodeMain.get_gameObject().SetActive(false);
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_009c: stateMachine*/)._003Cwait_003E__1--;
        });
        wait3++;
        magiSymbolLoader = new GameObject("magisymbol").AddComponent <ItemLoader>();
        magiSymbolLoader.LoadSkillItemSymbol(skillItemInfo.tableID, magiSymbolLoader.get_transform(), magiSymbolLoader.get_gameObject().get_layer(), delegate
        {
            //IL_0010: Unknown result type (might be due to invalid IL or missing references)
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003C_003Ef__this.magiSymbolLoader.nodeMain.get_gameObject().SetActive(false);
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0110: stateMachine*/)._003Cwait_003E__1--;
        });
        LoadingQueue loadingQueue = new LoadingQueue(this);
        LoadObject   lo_direction = loadingQueue.Load(RESOURCE_CATEGORY.UI, "GrowSkillDirection", false);

        LoadObject[] materialLoadObjects = new LoadObject[materials.Length];
        for (int j = 0; j < materials.Length; j++)
        {
            SkillItemTable.SkillItemData data = Singleton <SkillItemTable> .I.GetSkillItemData(materials[j].tableID);

            materialLoadObjects[j] = loadingQueue.Load(RESOURCE_CATEGORY.ITEM_MODEL, ResourceName.GetSkillItemModel(data.modelID), false);
        }
        wait3++;
        NPCTable.NPCData npcData = Singleton <NPCTable> .I.GetNPCData(3);

        GameObject npcRoot = new GameObject("NPC");

        npcData.LoadModel(npcRoot, false, true, delegate
        {
            ((_003CDoInitialize_003Ec__Iterator135) /*Error near IL_0224: stateMachine*/)._003Cwait_003E__1--;
        }, false);
        CacheAudio(loadingQueue);
        yield return((object)loadingQueue.Wait());

        while (wait3 > 0)
        {
            yield return((object)null);
        }
        Object    directionObject    = lo_direction.loadedObject;
        Transform directionTransform = ResourceUtility.Realizes(directionObject, MonoBehaviourSingleton <StageManager> .I.stageObject, -1);

        GameObject[] materialObjects = (GameObject[])new GameObject[materials.Length];
        for (int i = 0; i < materials.Length; i++)
        {
            SkillItemTable.SkillItemData data2 = Singleton <SkillItemTable> .I.GetSkillItemData(materials[i].tableID);

            Transform item = ResourceUtility.Realizes(materialLoadObjects[i].loadedObject, -1);
            PlayerLoader.SetEquipColor(item, data2.modelColor.ToColor());
            materialObjects[i] = item.get_gameObject();
        }
        magiLoader.nodeMain.get_gameObject().SetActive(true);
        magiSymbolLoader.nodeMain.get_gameObject().SetActive(true);
        SkillGrowDirector d = directionTransform.GetComponent <SkillGrowDirector>();

        d.Init();
        d.SetNPC(npcRoot);
        d.SetMagiModel(magiLoader.get_gameObject(), magiSymbolLoader.get_gameObject(), materialObjects);
        d.SetMaterials(materials);
        director = d;
        base.Initialize();
    }
Exemplo n.º 25
0
        public static string GetText(string text, string integratedFontName = null)
        {
            var resource = ResourceUtility.GetResource <FigletTransform>($"Fonts.{integratedFontName ?? "cybermedium"}.flf");

            return(GetText(text, resource));
        }
Exemplo n.º 26
0
    private IEnumerator Start()
    {
        ResourceManager.internalMode = true;
        GameSaveData.Load();
        if (PlayerPrefs.GetInt("INIT_SE_VOLUME", 0) == 0)
        {
            if (GameSaveData.instance.volumeSE == 1f)
            {
                GameSaveData.instance.volumeSE = 0.5f;
            }
            PlayerPrefs.SetInt("INIT_SE_VOLUME", 1);
        }
        if (string.IsNullOrEmpty(GameSaveData.instance.graphicOptionKey))
        {
            if (NetworkNative.isRunOnRazerPhone())
            {
                GameSaveData.instance.graphicOptionKey = "highest";
                Application.set_targetFrameRate(120);
                Time.set_fixedDeltaTime(0.008333335f);
            }
            else
            {
                GameSaveData.instance.graphicOptionKey = "low";
            }
        }
        if (GameSaveData.instance != null)
        {
            if (GameSaveData.instance.graphicOptionKey == "highest")
            {
                Application.set_targetFrameRate(120);
                Time.set_fixedDeltaTime(0.008333335f);
            }
            else
            {
                Application.set_targetFrameRate(30);
            }
        }
        NetworkNative.setHost(NetworkManager.APP_HOST);
        isAnalytics = true;
        NetworkNative.getAnalytics();
        MonoBehaviourSingleton <AppMain> .I.UpdateResolution(true);

        MonoBehaviourSingleton <SoundManager> .I.UpdateConfigVolume();

        if (MonoBehaviourSingleton <InGameManager> .IsValid())
        {
            MonoBehaviourSingleton <InGameManager> .I.UpdateConfig();
        }
        if (MonoBehaviourSingleton <InputManager> .IsValid())
        {
            MonoBehaviourSingleton <InputManager> .I.UpdateConfigInput();
        }
        Transform ui_root = ResourceUtility.Realizes(Resources.Load("UI/UI_Root"), MonoBehaviourSingleton <AppMain> .I._transform, -1);

        ui_root.get_gameObject().AddComponent <UIManager>();
        MonoBehaviourSingleton <UIManager> .I.SetDisable(UIManager.DISABLE_FACTOR.INITIALIZE, true);

        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <GameSceneManager>();

        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <UserInfoManager>();

        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <TransitionManager>();

        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <FBManager>();

        MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <NativeGameService>();

        Singleton <StringTable> .Create();

        Singleton <StringTable> .I.CreateTable(null);

        MonoBehaviourSingleton <GameSceneManager> .I.Initialize();

        LoadingQueue load_queue             = new LoadingQueue(this);
        LoadObject   lo_sound_se_table      = load_queue.Load(RESOURCE_CATEGORY.TABLE, "SETable", false);
        LoadObject   lo_audio_setting_table = load_queue.Load(RESOURCE_CATEGORY.TABLE, "AudioSettingTable", false);

        while (load_queue.IsLoading() || !MonoBehaviourSingleton <GameSceneManager> .I.isInitialized)
        {
            yield return((object)null);
        }
        Singleton <SETable> .Create();

        Singleton <SETable> .I.CreateTableFromInternal((lo_sound_se_table.loadedObject as TextAsset).get_text());

        Singleton <AudioSettingTable> .Create();

        Singleton <AudioSettingTable> .I.CreateTableFromInternal((lo_audio_setting_table.loadedObject as TextAsset).get_text());

        if (MonoBehaviourSingleton <SoundManager> .IsValid())
        {
            MonoBehaviourSingleton <SoundManager> .I.LoadParmanentAudioClip();

            while (MonoBehaviourSingleton <SoundManager> .I.IsLoadingAudioClip())
            {
                yield return((object)null);
            }
        }
        MonoBehaviourSingleton <ResourceManager> .I.SetURL(NetworkManager.IMG_HOST);

        MonoBehaviourSingleton <GoGameResourceManager> .I.LoadVariantManifest();

        while (MonoBehaviourSingleton <GoGameResourceManager> .I.isLoadingVariantManifest)
        {
            Debug.Log((object)"Waiting LoadingVariantManifest ");
            yield return((object)null);
        }
        int reset = PlayerPrefs.GetInt("AppMain.Reset", 0);

        if (reset != 0)
        {
            yield return((object)null);

            MonoBehaviourSingleton <AppMain> .I.Reset((reset & 1) != 0, (reset & 2) != 0);
        }
        else
        {
            float analyticTimeCount = 5f;
            while (isAnalytics)
            {
                analyticTimeCount -= Time.get_deltaTime();
                if (analyticTimeCount < 0f)
                {
                    int err_code = 200000;
                    MonoBehaviourSingleton <GameSceneManager> .I.OpenCommonDialog(new CommonDialog.Desc(CommonDialog.TYPE.OK, StringTable.Format(STRING_CATEGORY.COMMON_DIALOG, 1001u, err_code), StringTable.Get(STRING_CATEGORY.COMMON_DIALOG, 100u), null, null, null), delegate
                    {
                        MonoBehaviourSingleton <AppMain> .I.Reset();
                    }, true, err_code);

                    yield break;
                }
                yield return((object)null);
            }
            bool wait = true;
            MonoBehaviourSingleton <AccountManager> .I.SendCheckRegister(analyticsString, delegate
            {
                ((_003CStart_003Ec__Iterator19) /*Error near IL_0495: stateMachine*/)._003Cwait_003E__7 = false;
            });

            while (wait)
            {
                yield return((object)null);
            }
            MonoBehaviourSingleton <ResourceManager> .I.cache.ClearObjectCaches(true);

            MonoBehaviourSingleton <ResourceManager> .I.cache.ClearPackageCaches();

            bool assetbundle_mode = isAssetBundleMode();
            bool to_opening       = IsOpening();
            if (assetbundle_mode)
            {
                if (!CheckPermissions())
                {
                    bool isFirstLoad = PlayerPrefs.GetInt("first_time_load_game_msg", 0) == 0;
                    AndroidPermissionsManager.ShouldShowRequestPermission("android.permission.WRITE_EXTERNAL_STORAGE");
                    PlayerPrefs.SetInt("first_time_load_game_msg", 1);
                    if (!isFirstLoad)
                    {
                        MonoBehaviourSingleton <UIManager> .I.loading.ShowChangePermissionMsg(true);

                        while (!CheckPermissions())
                        {
                            yield return((object)null);
                        }
                    }
                    else
                    {
                        MonoBehaviourSingleton <UIManager> .I.loading.ShowWellcomeMsg(true);

                        while (isWaitGrantedPermission)
                        {
                            yield return((object)null);
                        }
                        while (!isGrantedPermission)
                        {
                            isWaitGrantedPermission = true;
                            MonoBehaviourSingleton <UIManager> .I.loading.ShowDellyMsg(true);

                            MonoBehaviourSingleton <UIManager> .I.loading.ShowEmptyFirstLoad(false);

                            while (isWaitGrantedPermission)
                            {
                                yield return((object)null);
                            }
                            if (!isGrantedPermission && !AndroidPermissionsManager.ShouldShowRequestPermission("android.permission.WRITE_EXTERNAL_STORAGE"))
                            {
                                MonoBehaviourSingleton <UIManager> .I.loading.HideAllPermissionMsg();

                                MonoBehaviourSingleton <UIManager> .I.loading.ShowChangePermissionMsg(true);

                                while (!CheckPermissions())
                                {
                                    yield return((object)null);
                                }
                                isGrantedPermission = true;
                            }
                        }
                    }
                    MonoBehaviourSingleton <UIManager> .I.loading.ShowEmptyFirstLoad(true);

                    MonoBehaviourSingleton <UIManager> .I.loading.HideAllTextMsg();

                    yield return((object)null);
                }
                else if (PlayerPrefs.GetInt("first_time_load_game_msg", 0) == 0)
                {
                    PlayerPrefs.SetInt("first_time_load_game_msg", 1);
                    MonoBehaviourSingleton <UIManager> .I.loading.ShowEmptyFirstLoad(true);
                }
                if (to_opening)
                {
                    MonoBehaviourSingleton <UIManager> .I.loading.downloadGaugeVisible = false;
                }
                MonoBehaviourSingleton <ResourceManager> .I.SetURL(NetworkManager.IMG_HOST);

                MonoBehaviourSingleton <ResourceManager> .I.LoadManifest();

                while (MonoBehaviourSingleton <ResourceManager> .I.isLoadingManifest)
                {
                    yield return((object)null);
                }
                ResourceManager.internalMode = false;
                load_queue.Load(RESOURCE_CATEGORY.SHADER, null, null, true);
                load_queue.Load(RESOURCE_CATEGORY.UI_FONT, null, null, true);
                ResourceManager.internalMode = true;
                yield return((object)load_queue.Wait());

                MonoBehaviourSingleton <ResourceManager> .I.cache.MarkSystemPackage(RESOURCE_CATEGORY.SHADER.ToAssetBundleName(null));

                MonoBehaviourSingleton <ResourceManager> .I.cache.MarkSystemPackage(RESOURCE_CATEGORY.UI_FONT.ToAssetBundleName(null));

                MonoBehaviourSingleton <ResourceManager> .I.cache.CacheShadersFromPackage(RESOURCE_CATEGORY.SHADER.ToAssetBundleName(null));

                MonoBehaviourSingleton <UIManager> .I.loading.downloadGaugeVisible = true;
            }
            NetworkNative.getNativeAsset();
            if (MonoBehaviourSingleton <AccountManager> .I.sendAsset)
            {
                NetworkNative.getNativeiOSAsset();
            }
            if (to_opening)
            {
                Native.CheckReferrerSendToAppBrowser();
                ResourceManager.internalMode = true;
                ResourceManager.internalMode = false;
                if (MonoBehaviourSingleton <ResourceManager> .I.manifest != null)
                {
                    ResourceManager.internalMode = true;
                }
                MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <OpeningStartProcess>();
            }
            else
            {
                ResourceManager.internalMode = false;
                MonoBehaviourSingleton <AppMain> .I.get_gameObject().AddComponent <LoadingProcess>();
            }
            Object.Destroy(this);
        }
    }
Exemplo n.º 27
0
 public TelephoneValidatorAttribute() : base(DataType.PhoneNumber)
 {
     this.ErrorMessage = ResourceUtility.GetString("${Text.TelephoneValidator.Invalid}");
 }
 internal EllipseSymbol()
     : base()
 {
     this.ControlTemplate = ResourceUtility.LoadEmbeddedResource("EditorSupport/SymbolTemplates.xaml", "EllipseSymbol")
                            as ControlTemplate;
 }
        private static PostInfo GenererPostInfo(bool erDigitalPostMottaker, bool erNorskBrev)
        {
            var resourceUtility = new ResourceUtility("Difi.SikkerDigitalPost.Klient.Testklient.Resources.Sertifikater");

            PostInfo postInfo;
            PostMottaker mottaker;
            var sertifikat =
                new X509Certificate2(resourceUtility.ReadAllBytes(true, "testmottakerFraOppslagstjenesten.pem"));

            if (erDigitalPostMottaker)
            {
                mottaker = new DigitalPostMottaker(Settings.Default.MottakerPersonnummer,
                    Settings.Default.MottakerDigipostadresse, sertifikat, Settings.Default.OrgnummerPosten
                    );

                postInfo = new DigitalPostInfo((DigitalPostMottaker) mottaker, "Ikke-sensitiv tittel",
                    Sikkerhetsnivå.Nivå3, true);
                ((DigitalPostInfo) postInfo).Virkningstidspunkt = DateTime.Now.AddMinutes(0);

                ((DigitalPostInfo) postInfo).SmsVarsel = new SmsVarsel("12345678", "Et lite varsel pr SMS.");
            }
            else
            {
                Adresse adresse;
                if (erNorskBrev)
                    adresse = new NorskAdresse("0566", "Oslo");
                else
                    adresse = new UtenlandskAdresse("SE", "Saltkråkan 22");

                mottaker = new FysiskPostMottaker("Rolf Rolfsen", adresse,
                    sertifikat, Settings.Default.OrgnummerPosten);

                var returMottaker = new FysiskPostReturmottaker("ReturKongen", new NorskAdresse("1533", "Søppeldynga"));

                postInfo = new FysiskPostInfo((FysiskPostMottaker) mottaker, Posttype.A, Utskriftsfarge.SortHvitt,
                    Posthåndtering.DirekteRetur, returMottaker);
            }
            return postInfo;
        }
Exemplo n.º 30
0
    private void SetupMaskSprite()
    {
        //IL_004d: Unknown result type (might be due to invalid IL or missing references)
        //IL_004f: Unknown result type (might be due to invalid IL or missing references)
        //IL_005a: Unknown result type (might be due to invalid IL or missing references)
        //IL_0064: Unknown result type (might be due to invalid IL or missing references)
        //IL_0069: Unknown result type (might be due to invalid IL or missing references)
        //IL_0077: Unknown result type (might be due to invalid IL or missing references)
        //IL_008c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0097: Unknown result type (might be due to invalid IL or missing references)
        //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b7: Unknown result type (might be due to invalid IL or missing references)
        //IL_00c7: Unknown result type (might be due to invalid IL or missing references)
        //IL_00cc: Unknown result type (might be due to invalid IL or missing references)
        //IL_00dc: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
        //IL_0139: Unknown result type (might be due to invalid IL or missing references)
        //IL_01c2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01c6: Unknown result type (might be due to invalid IL or missing references)
        //IL_01d2: Unknown result type (might be due to invalid IL or missing references)
        //IL_01dc: Unknown result type (might be due to invalid IL or missing references)
        //IL_01e1: Unknown result type (might be due to invalid IL or missing references)
        //IL_01eb: Unknown result type (might be due to invalid IL or missing references)
        //IL_0200: Unknown result type (might be due to invalid IL or missing references)
        //IL_0207: Unknown result type (might be due to invalid IL or missing references)
        //IL_021c: Unknown result type (might be due to invalid IL or missing references)
        //IL_0223: Unknown result type (might be due to invalid IL or missing references)
        //IL_0233: Unknown result type (might be due to invalid IL or missing references)
        //IL_0238: Unknown result type (might be due to invalid IL or missing references)
        //IL_0248: Unknown result type (might be due to invalid IL or missing references)
        //IL_024d: Unknown result type (might be due to invalid IL or missing references)
        //IL_029f: Unknown result type (might be due to invalid IL or missing references)
        //IL_02ae: Unknown result type (might be due to invalid IL or missing references)
        Shader       shader      = ResourceUtility.FindShader("mobile/Custom/ui_alpha_mask");
        Material     material    = GetMaterial(sprite.material, shader);
        UISpriteData atlasSprite = sprite.GetAtlasSprite();
        Rect         rect        = default(Rect);

        rect._002Ector((float)atlasSprite.x, (float)atlasSprite.y, (float)atlasSprite.width, (float)atlasSprite.height);
        Rect uvRect = NGUIMath.ConvertToTexCoords(rect, material.get_mainTexture().get_width(), material.get_mainTexture().get_height());

        maskSprite = new GameObject(sprite.get_name()).AddComponent <UITexture>();
        maskSprite.get_gameObject().set_layer(sprite.get_gameObject().get_layer());
        maskSprite.get_transform().set_parent(sprite.get_transform());
        maskSprite.get_transform().set_localPosition(Vector3.get_zero());
        maskSprite.get_transform().set_localScale(Vector3.get_one());
        maskSprite.depth    = sprite.depth + MASK_DEPTH;
        maskSprite.width    = sprite.width;
        maskSprite.height   = sprite.height;
        maskSprite.uvRect   = uvRect;
        maskSprite.material = material;
        if (Object.op_Implicit(maskingObject))
        {
            UISprite uISprite = maskingObject as UISprite;
            if (Object.op_Implicit(uISprite))
            {
                Shader       shader2      = ResourceUtility.FindShader("mobile/Custom/ui_add_depth_greater");
                Material     material2    = GetMaterial(uISprite.material, shader2);
                UISpriteData atlasSprite2 = uISprite.GetAtlasSprite();
                Rect         rect2        = default(Rect);
                rect2._002Ector((float)atlasSprite2.x, (float)atlasSprite2.y, (float)atlasSprite2.width, (float)atlasSprite2.height);
                Rect uvRect2 = NGUIMath.ConvertToTexCoords(rect2, material2.get_mainTexture().get_width(), material2.get_mainTexture().get_height());
                maskedSprite = new GameObject(uISprite.get_name()).AddComponent <UITexture>();
                maskedSprite.get_gameObject().set_layer(uISprite.get_gameObject().get_layer());
                maskedSprite.get_transform().set_parent(uISprite.get_transform());
                maskedSprite.get_transform().set_localPosition(Vector3.get_zero());
                maskedSprite.get_transform().set_localScale(Vector3.get_one());
                maskedSprite.depth    = sprite.depth + MASK_DEPTH + 1;
                maskedSprite.width    = uISprite.width;
                maskedSprite.height   = uISprite.height;
                maskedSprite.uvRect   = uvRect2;
                maskedSprite.color    = uISprite.color;
                maskedSprite.material = material2;
                uISprite.set_enabled(false);
            }
            else
            {
                maskingObject.depth = sprite.depth + MASK_DEPTH + 1;
            }
        }
        valid = true;
    }
    private IEnumerator DoStartLogoAnimation(bool tutorial_flag, Action onComplete, Action onLoop)
    {
        logo.root.set_position(Vector3.get_up() * 1000f);
        logo.root.set_rotation(Quaternion.get_identity());
        logo.root.set_localScale(Vector3.get_one());
        logo.camera.get_gameObject().SetActive(true);
        Material faderMat = logo.fader.get_material();
        Material logoMat  = logo.logo.get_material();

        logo.camera.set_depth(-1f);
        logo.dragonRoot.SetActive(false);
        Color dragonPlaneColor = new Color(1f, 1f, 1f, 0f);

        logo.dragonPlane.get_sharedMaterial().SetColor("Color", dragonPlaneColor);
        if (tutorial_flag)
        {
            this.StartCoroutine(DoFadeOut());
            SoundManager.RequestBGM(11, false);
            while (MonoBehaviourSingleton <SoundManager> .I.playingBGMID != 11 || MonoBehaviourSingleton <SoundManager> .I.changingBGM)
            {
                yield return((object)null);
            }
            yield return((object)new WaitForSeconds(2.3f));
        }
        else
        {
            faderMat.SetColor("_Color", new Color(0f, 0f, 0f, 0f));
        }
        effects = (GameObject[])new GameObject[titleEffectPrefab.Length];
        for (int j = 0; j < titleEffectPrefab.Length; j++)
        {
            rymFX effect = ResourceUtility.Realizes(titleEffectPrefab[j], -1).GetComponent <rymFX>();
            effect.Cameras = (Camera[])new Camera[1]
            {
                logo.camera
            };
            effect.get__transform().set_localScale(effect.get__transform().get_localScale() * 10f);
            if (j == 1)
            {
                effect.get__transform().set_position(new Vector3(0.568f, 999.946f, 0.1f));
            }
            else
            {
                effect.get__transform().set_position(logo.eye.get_transform().get_position());
            }
            effects[j] = effect.get_gameObject();
        }
        yield return((object)new WaitForSeconds(1f));

        float timer4 = 0f;

        while (timer4 < 0.17f)
        {
            timer4 += Time.get_deltaTime();
            float s = Mathf.Clamp01(timer4 / 0.17f);
            logo.eye.get_transform().set_localScale(Vector3.get_one() * s * 10f);
            logoMat.SetFloat("_AlphaRate", -1f + timer4 * 2f);
            yield return((object)null);
        }
        logo.dragonRoot.SetActive(true);
        while (timer4 < 1f)
        {
            timer4 += Time.get_deltaTime();
            logoMat.SetFloat("_AlphaRate", -1f + timer4 * 2f);
            dragonPlaneColor.a = timer4;
            logo.dragonPlane.get_sharedMaterial().SetColor("Color", dragonPlaneColor);
            yield return((object)null);
        }
        dragonPlaneColor.a = 1f;
        logo.dragonPlane.get_sharedMaterial().SetColor("Color", dragonPlaneColor);
        timer4 = 0f;
        while (timer4 < 0.5f)
        {
            timer4 += Time.get_deltaTime();
            logoMat.SetFloat("_BlendRate", timer4 * 2f);
            yield return((object)null);
        }
        logo.bg.SetActive(true);
        logo.effect1.SetActive(true);
        timer4 = 0f;
        Material bgMaterial = logo.bgFader.get_material();

        while (timer4 < 0.7f)
        {
            timer4 += Time.get_deltaTime();
            bgMaterial.set_color(new Color(1f, 1f, 1f, 1f - timer4 / 0.7f));
            yield return((object)null);
        }
        if (!tutorial_flag)
        {
            onLoop?.Invoke();
            while (!tutorial_flag)
            {
                yield return((object)null);
            }
        }
        yield return((object)new WaitForSeconds(0.3f));

        if (titleUIPrefab != null)
        {
            Transform title_ui = ResourceUtility.Realizes(titleUIPrefab, MonoBehaviourSingleton <UIManager> .I.uiRootTransform, 5);
            if (title_ui != null)
            {
                Transform t3 = Utility.Find(title_ui, "BTN_START");
                if (t3 != null)
                {
                    t3.GetComponent <Collider>().set_enabled(false);
                }
                t3 = Utility.Find(title_ui, "BTN_ADVANCED_LOGIN");
                if (t3 != null)
                {
                    t3.get_gameObject().SetActive(false);
                }
                t3 = Utility.Find(title_ui, "BTN_CLEARCACHE");
                if (t3 != null)
                {
                    t3.get_gameObject().SetActive(false);
                }
            }
        }
        yield return((object)new WaitForSeconds(6f));

        timer4 = 0f;
        while (timer4 < 0.3f)
        {
            timer4 += Time.get_deltaTime();
            faderMat.SetColor("_Color", new Color(0f, 0f, 0f, timer4 / 0.3f));
            yield return((object)null);
        }
        MonoBehaviourSingleton <InputManager> .I.SetDisable(INPUT_DISABLE_FACTOR.INGAME_TUTORIAL, false);

        for (int i = 0; i < effects.Length; i++)
        {
            EffectManager.ReleaseEffect(effects[i], true, false);
        }
        onComplete?.Invoke();
    }
        private static Forsendelse GenererForsendelse(Avsender avsender, PostInfo postInfo)
        {
            var resourceUtility = new ResourceUtility("Difi.SikkerDigitalPost.Klient.Testklient.Resources");

            var hoveddokument = resourceUtility.ReadAllBytes(true, "Hoveddokument.pdf");
            var vedlegg = resourceUtility.ReadAllBytes(true, "Vedlegg.txt");

            //Forsendelse
            var dokumentpakke =
                new Dokumentpakke(new Dokument("Sendt" + DateTime.Now, hoveddokument, "application/pdf", "NO",
                    "OWASP TOP 10.pdf"));
            dokumentpakke.LeggTilVedlegg(new Dokument("Vedlegg", vedlegg, "text/plain", "NO", "Vedlegg.txt"));
            var forsendelse = new Forsendelse(avsender, postInfo, dokumentpakke, Prioritet.Prioritert, MpcId);

            return forsendelse;
        }
Exemplo n.º 33
0
        public override void Load()
        {
            base.Load();
            minSize = maxSize = new Vector2(450, 550);
            SetTitle("Dreamteck Splines " + PluginInfo.version, "Dreamteck Splines");
            panels    = new WindowPanel[6];
            panels[0] = new WindowPanel("Home", true, 0.25f);
            panels[1] = new WindowPanel("Changelog", false, panels[0], 0.25f);
            panels[2] = new WindowPanel("Learn", false, panels[0], 0.25f);
            panels[3] = new WindowPanel("Support", false, panels[0], 0.25f);
            panels[4] = new WindowPanel("Examples", false, panels[2], 0.25f);
            panels[5] = new WindowPanel("Playmaker", false, panels[0], 0.25f);



            panels[0].elements.Add(new WindowPanel.Space(400, 10));
            panels[0].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "changelog.png", "What's new?", "See all new features, important changes and bugfixes in " + PluginInfo.version, new ActionLink(panels[1], panels[0])));
            panels[0].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "get_started.png", "Get Started", "Learn how to use Dreamteck Splines in a matter of minutes", new ActionLink(panels[2], panels[0])));
            panels[0].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "support.png", "Support", "Got a problem or a feature request? Our support is here to help!", new ActionLink(panels[3], panels[0])));
            panels[0].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "playmaker.png", "Playmaker Actions", "Install Playmaker actions for Dreamteck Splines", new ActionLink(panels[5], panels[0])));
            panels[0].elements.Add(new WindowPanel.Space(400, 20));
            panels[0].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "rate.png", "Rate", "If you like Dreamteck Splines, please consider rating it on the Asset Store", new ActionLink("http://u3d.as/sLk")));
            panels[0].elements.Add(new WindowPanel.Thumbnail("Splines/Editor/Icons", "forever.png", "Forever", "Creating endless runners has never been easier. Forever is here to change the game!", new ActionLink("http://u3d.as/1t9T")));
            panels[0].elements.Add(new WindowPanel.Space(400, 10));
            panels[0].elements.Add(new WindowPanel.Label("This window will not appear again automatically. To open it manually go to Help/Dreamteck/About Dreamteck Splines", wrapText, new Color(1f, 1f, 1f, 0.5f), 400, 100));



            string path          = ResourceUtility.FindFolder(Application.dataPath, "Dreamteck/Splines/Editor");
            string changelogText = "Changelog file not found.";

            if (Directory.Exists(path))
            {
                if (File.Exists(path + "/changelog.txt"))
                {
                    string[] lines = File.ReadAllLines(path + "/changelog.txt");
                    changelogText = "";
                    for (int i = 0; i < lines.Length; i++)
                    {
                        changelogText += lines[i] + "\r\n";
                    }
                }
            }
            panels[1].elements.Add(new WindowPanel.Space(400, 10));
            panels[1].elements.Add(new WindowPanel.ScrollText(400, 400, changelogText));

            panels[2].elements.Add(new WindowPanel.Space(400, 10));
            panels[2].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "youtube.png", "Video Tutorials", "Watch a series of Youtube videos to get started.", new ActionLink("https://www.youtube.com/playlist?list=PLkZqalQdFIQ4S-UGPWCZTTZXiE5MebrVo")));
            panels[2].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "pdf.png", "User Manual", "Read a thorough documentation of the whole package along with a list of API methods.", new ActionLink("http://dreamteck.io/page/dreamteck_splines/user_manual.pdf")));
            panels[2].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "pdf.png", "API Reference", "A description of the classes, methods and properties inside the Dreamteck Splines API", new ActionLink("http://dreamteck.io/page/dreamteck_splines/api_reference.pdf")));
            panels[2].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "examples.png", "Examples", "Install example scenes", new ActionLink(panels[4], panels[2])));

            panels[3].elements.Add(new WindowPanel.Space(400, 10));
            panels[3].elements.Add(new WindowPanel.Thumbnail("Utilities/Editor/Images", "discord.png", "Discord Server", "Join our Discord community and chat with other developers and the team.", new ActionLink("https://discord.gg/bkYDq8v")));
            panels[3].elements.Add(new WindowPanel.Button(400, 30, "Contact Support", new ActionLink("http://dreamteck.io/team/contact.php?target=1")));

            panels[4].elements.Add(new WindowPanel.Space(400, 10));
            bool   packagExists = false;
            string dir          = ResourceUtility.FindFolder(Application.dataPath, "Dreamteck/Splines/");

            if (Directory.Exists(dir))
            {
                if (File.Exists(dir + "/Examples.unitypackage"))
                {
                    packagExists = true;
                }
            }
            if (packagExists)
            {
                panels[4].elements.Add(new WindowPanel.Button(400, 30, "Install Examples", new ActionLink(InstallExamples)));
            }
            else
            {
                panels[4].elements.Add(new WindowPanel.Label("Examples package not found", null, Color.white));
            }

            panels[5].elements.Add(new WindowPanel.Space(400, 10));
            packagExists = false;
            dir          = ResourceUtility.FindFolder(Application.dataPath, "Dreamteck/Splines/");
            if (Directory.Exists(dir))
            {
                if (File.Exists(dir + "/PlaymakerActions.unitypackage"))
                {
                    packagExists = true;
                }
            }
            if (packagExists)
            {
                panels[5].elements.Add(new WindowPanel.Button(400, 30, "Install Actions", new ActionLink(InstallPlaymaker)));
            }
            else
            {
                panels[5].elements.Add(new WindowPanel.Label("Playmaker actions not found", null, Color.white));
            }
        }
        internal static X509Certificate2 GetMottakerCertificate()
        {
            var ru = new ResourceUtility("difi_sdp_klient_smoke");
            var readAllBytes = ru.ReadAllBytes(true, "testavsendersertifikat.pem");

            return new X509Certificate2(readAllBytes);
        }