Пример #1
0
        /// <summary>
        /// 写日志 (发布时不实现)
        /// </summary>
        /// <param name="Mess">日志内容</param>
        /// <param name="lt">日志类型</param>
        /// <returns></returns>
        public bool WriteLogo(String Mess, LogoType lt)
        {
            bool ret = false;
            String path; //= HttpContext.Current.Server.MapPath(LogoPath);
              //  string path = Application.StartupPath + LogoPath;
            //path="e:\\logo";
            try
            {
                //CheckFile(path);
                //fs = new FileStream(path + LogoFileEx, FileMode.Append, FileAccess.Write);
                //sw = new StreamWriter(fs);
                //sw.WriteLine(GetLogo(Mess, lt));
                ret = true;
            }
            catch (IOException e)
            {
                // throw new Exception(e.Message);
                ret = false;
            }
            finally
            {
              //  sw.Close();
              //  fs.Close();
            }

            return ret;
        }
Пример #2
0
        public static void PrintLogo(ConsoleColor color, LogoType logoType = LogoType.New2)
        {
            string[] toPrint;
            switch (logoType)
            {
            case LogoType.Old:
                toPrint = OldLogoArr;
                break;

            case LogoType.New1:
                toPrint = NewLogo1Arr;
                break;

            case LogoType.New2:
                toPrint = NewLogo2Arr;
                break;

            case LogoType.New3:
            case LogoType.New4:
            default:
                toPrint = OldLogoArr;
                break;
            }

            Console.ForegroundColor = color;
            foreach (var line in toPrint)
            {
                Console.WriteLine(line);
            }
            Console.ResetColor();
        }
Пример #3
0
 public LogoList()
 {
     pager = new Pager(1, 20);
     enabled = -1;
     logoType = LogoType.Record;
     userId = 0;
     industry = "";
     repeatTemplate = "";
 }
Пример #4
0
 public Logo(Texture2D bg, string centerText, string subText, TimeSpan screenTime, Logo followUp, LogoType lType, SpriteFont sf, SpriteFont subf, bool follow)
 {
     this.bg              = bg;
     this.centerText      = centerText;
     this.subText         = subText;
     this.screenTime      = TimeSpan.Zero;
     this.totalScreenTime = screenTime;
     this.followUp        = followUp;
     this.lType           = lType;
     this.sf              = sf;
     this.subf            = subf;
     this.follow          = follow;
 }
Пример #5
0
        public ResponseAddLogo AddLogo(RequestAddLogo request)
        {
            var imagePath = SaveImageToWorksampleDirectory(request.FileName, request.FileData, CATALOG_DIRECTORY);

            var item = new LogoType()
            {
                Description = request.Description,
                ImageUrl    = imagePath,
                Name        = request.Name,
                Type        = request.TypeValue
            };

            dbManager.AddLogo(item);

            return(new ResponseAddLogo());
        }
Пример #6
0
        /// <summary>
        /// Returns a MemoryStream for your custom Supreme logo.
        /// </summary>
        /// <returns></returns>
        public static MemoryStream Supreme(string text, LogoType logoType = LogoType.Normal)
        {
            string mode = "";

            switch (logoType)
            {
            case LogoType.Dark:
                mode = "&dark=true";
                break;

            case LogoType.Light:
                mode = "&light=true";
                break;
            }
            return(RequestFunctions.ImageRequest($"supreme?text={text}{mode}"));
        }
Пример #7
0
    private IEnumerator InternalShowLogo(LogoType type, float time)
    {
        var setting = logoes.FirstOrDefault(ls => ls.type == type);

        if (setting == null)
        {
            yield break;
        }
        setting.logo.SetActive(true);
        if (time > 0f)
        {
            yield return(new WaitForSeconds(time));

            setting.logo.SetActive(false);
        }
    }
Пример #8
0
 public void Update(TimeSpan timePassed)
 {
     screenTime += timePassed;
     textAlt     = totalScreenTime.Seconds - screenTime.Seconds;
     if (screenTime >= totalScreenTime && followUp != null && follow)
     {
         this.bg              = followUp.bg;
         this.centerText      = followUp.centerText;
         this.subText         = followUp.subText;
         this.screenTime      = TimeSpan.Zero;
         this.totalScreenTime = followUp.totalScreenTime;
         this.lType           = followUp.lType;
         this.sf              = followUp.sf;
         if (followUp.follow)
         {
             this.follow   = followUp.follow;
             this.followUp = followUp.followUp;
         }
         else
         {
             this.follow = false;
         }
     }
 }
Пример #9
0
 /// <summary>
 ///  ��ȡLogo��¼
 /// </summary>
 /// <param name="type">Logo����</param>
 /// <param name="pager">��ҳ����</param>
 /// <param name="uid">�û�ID</param>
 /// <returns></returns>
 public static ArrayList List(LogoType type, Pager pager, int uid)
 {
     return List(type, pager, uid, "", -1, "");
 }
Пример #10
0
        /// <summary>
        /// 写入文本的内容
        /// </summary>
        /// <param name="Mess"></param>
        /// <param name="lt"></param>
        /// <returns></returns>
        private static String GetLogo(String Mess, LogoType lt)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            sb.Append("\t\t");
            sb.Append(GetEnumDescription(lt));
            sb.Append("\t");
            sb.Append(Mess);

            return sb.ToString();
        }
Пример #11
0
 public void AddLogo(LogoType item)
 {
     repository.LogoTypes.DbSet.Add(item);
     repository.SaveChanges();
 }
Пример #12
0
 /// <summary>
 /// ��ȡLogo��¼
 /// </summary>
 /// <param name="type">Logo����</param>
 /// <param name="pager">��ҳ����</param>
 /// <returns></returns>
 public static ArrayList List(LogoType type, Pager pager)
 {
     return List(type, pager, 0, "", -1, "");
 }
Пример #13
0
        /// <summary>
        /// ��ȡLogo��¼
        /// </summary>
        /// <param name="type">Logo����</param>
        /// <param name="pager">��ҳ����</param>
        /// <param name="uid">�û�ID</param>
        /// <param name="industry">��ҵ����</param>
        /// <param name="sta">ָ��������</param>
        /// <returns>ArrayList</returns>
        private static ArrayList List(LogoType type, Pager pager, int uid, string industry, int enabled,string exclude)
        {
            ArrayList list = new ArrayList();
            /*
             LogoList
            @type char(1),
            @uid int=0,
            @industry char(6)='000000',
            @pageindex int=1,
            @pagesize int=20,
            @sort int=0
             */
            SqlParameter[] prams ={
                Database.MakeReturnValueParam("@returnValue"),
                Database.MakeInParam("@type",SqlDbType.Char,1,((int)type).ToString()),
                Database.MakeInParam("@uid",SqlDbType.Int,uid),
                Database.MakeInParam("@industry",SqlDbType.Char,6,industry),
                Database.MakeInParam("@enabled",SqlDbType.Char,6,enabled),
                Database.MakeInParam("@exclude",SqlDbType.VarChar,32,String.IsNullOrEmpty(exclude)?"":exclude.Trim()),
                Database.MakeInParam("@pageindex",SqlDbType.Int,pager.PageIndex),
                Database.MakeInParam("@pagesize",SqlDbType.Int,pager.PageSize),
                Database.MakeInParam("@sort",SqlDbType.Int,pager.SortNum)
            };

            SqlDataReader reader = null;

            try
            {
                reader = Database.ExecuteReader(CommandType.StoredProcedure, "LogoList", prams);

                if (reader.Read())
                {
                    pager.RecordCount = reader.GetInt32(0);

                    if (reader.NextResult())
                    {
                        while (reader.Read())
                        {
                            /*[Id],Type,Guid, UserId,Industry, Title, Score, ImageType, CreateDatetime, Enabled,ComName*/
                            LogoBase logo = new LogoBase();
                            logo.Id = reader.GetInt32(0);
                            logo.LType = (LogoType)Convert.ToInt16(reader.GetString(1));
                            logo.Guid = reader.GetString(2);
                            logo.UserId = reader.GetInt32(3);
                            logo.Industry = reader.GetString(4);
                            logo.Title = reader.GetString(5);
                            logo.Score = reader.GetInt32(6);
                            logo.ImageType = (LogoImageType)Convert.ToInt16(reader.GetString(7));
                            logo.CreateDatetime = reader.GetDateTime(8);
                            logo.Enabled = reader.GetString(9) == "1" ? true : false;
                            logo.ComName = reader.GetString(10);
                            list.Add(logo);
                        }
                    }
                }
                reader.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
            }

            return list;
        }
Пример #14
0
 /// <summary>
 /// ��ȡLogo��¼
 /// </summary>
 /// <param name="type">Logo����</param>
 /// <param name="pager">��ҳ����</param>
 /// <param name="enabled">ָ��������</param>
 /// <returns>ArrayList</returns>
 public static ArrayList List(LogoType type, Pager pager, bool enabled)
 {
     return List(type, pager, 0, "", enabled ? 1 : 0, "");
 }
Пример #15
0
 /// <summary>
 /// ��ȡLogo��¼
 /// </summary>
 /// <param name="type">Logo����</param>
 /// <param name="pager">��ҳ����</param>
 /// <param name="industry">��ҵ����</param>
 /// <returns></returns>
 public static ArrayList List(LogoType type, Pager pager, string industry)
 {
     return List(type, pager, 0, industry, -1, "");
 }
Пример #16
0
 /// <summary>
 /// ��ȡLogo��¼
 /// </summary>
 /// <param name="type">Logo����</param>
 /// <param name="pager">��ҳ����</param>
 /// <param name="industry">��ҵ����</param>
 /// <param name="enabled">ָ��������</param>
 /// <returns>ArrayList</returns>
 public static ArrayList List(LogoType type, Pager pager, string industry, bool enabled)
 {
     return List(type, pager, 0, industry, enabled ? 1 : 0, "");
 }
Пример #17
0
 /// <summary>
 /// ロゴ表示。time 後に消去。time <= 0 なら消去しない。
 /// </summary>
 public void ShowLogo(LogoType type, float time = -1f)
 {
     StartCoroutine(InternalShowLogo(type, time));
 }
Пример #18
0
 public static LogoBase Create(LogoType type)
 {
     LogoBase logo = new LogoBase();
     logo.LType = type;
     return logo;
 }