当前位置: 首页>>代码示例>>C#>>正文


C# Misc类代码示例

本文整理汇总了C#中Misc的典型用法代码示例。如果您正苦于以下问题:C# Misc类的具体用法?C# Misc怎么用?C# Misc使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Misc类属于命名空间,在下文中一共展示了Misc类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShowMessage

 public void ShowMessage(Misc.MessageType type, string message)
 {
     if (vGroupInfo.Visible)
     {
         switch (type)
         {
             case Misc.MessageType.Error:
                 lblError.CssClass = "error";
                 break;
             case Misc.MessageType.Success:
                 lblError.CssClass = "message";
                 break;
         }                
         lblError.Text = message;
     }
     else if (vJoinGroup.Visible)
     {
         switch (type)
         {
             case Misc.MessageType.Error:
                 lblError2.CssClass = "error";
                 break;
             case Misc.MessageType.Success:
                 lblError2.CssClass = "message";
                 break;
         }                
         lblError2.Text = message;
     }
 }
开发者ID:haimon74,项目名称:Easy-Fixup,代码行数:29,代码来源:ViewGroup.ascx.cs

示例2: requestEnd

 public static void requestEnd(string pluginid, Connector conn, ref Misc.PageElements pageElements, HttpRequest request, HttpResponse response)
 {
     bool cookiesEnabled = request.Cookies["cookie-control"] != null;
     // Add styling and toggle button
     Misc.Plugins.addHeaderCSS(pageElements["URL"] + "/Content/CSS/CookieControl.css", ref pageElements);
     Misc.Plugins.addHeaderJS(pageElements["URL"] + "/Content/JS/CookieControl.js", ref pageElements);
     // Add toggle button
     pageElements.appendToKey("BODY_FOOTER", Core.templates["cookiecontrol"]["toggle"]);
     // Add warning banner
     if (!cookiesEnabled)
         pageElements.appendToKey("BODY_HEADER", Core.templates["cookiecontrol"]["banner"]);
     else
     {
         // Check if cookies have been enabled, if so return - no need to remove cookies
         pageElements.setFlag("COOKIES_ON");
         return;
     }
     // Clear all the response cookies - these may have been added programmatically
     response.Cookies.Clear();
     // Add each cookie, sent in the request, in the response - to expire
     HttpCookie cookie;
     for (int i = 0; i < request.Cookies.Count; i++)
     {
         cookie = request.Cookies[i];
         if (cookie.Name != "ASP.NET_SessionId")
         {
             cookie.Expires = DateTime.Now.AddDays(-2);
             response.Cookies.Add(cookie);
         }
     }
 }
开发者ID:kassemshehady,项目名称:Uber-CMS,代码行数:31,代码来源:Base.cs

示例3: InsertAddTList

 // Algo d'ajout par insertion
 private static void InsertAddTList(ref Misc.TList L, int w, char k)
 {
     Misc.TList p, prec, nouv;
     p = L;
     prec = null; // sert à rien, c'est juste pour que VS croit pas qu'on arrive au else avec prec sans valeur.
     while (p.Weight != 0 && p.Weight < w) // weight = 0 équivaut à pointeur nul.
     {
         prec = p;
         p = p.Next;
     }
     nouv = new Misc.TList();
     nouv.Weight = w;
     nouv.Next = p;
     nouv.Tree = new Misc.TBinaryTree();
     nouv.Tree.Key = k;
     nouv.Tree.Left = null;
     nouv.Tree.Right = null;
     if (p == L)
     {
         L = nouv;
     }
     else
     {
         prec.Next = nouv;
     }
 }
开发者ID:Zboubinours,项目名称:tp,代码行数:27,代码来源:Compression.cs

示例4: Draw

 //Tillaggt! -Erik
 public void Draw(int w, int h, Misc.Camera cam, float ScaleFactor = 1f, bool ShadowPass = false)
 {
     for(int i = 0; i < 24; i++) {
         for(int k = 0; k < 24; k++) {
             map[i, k].Draw(w, h, cam, ScaleFactor, 0.0f, ShadowPass);
         }
     }
 }
开发者ID:Erlisch,项目名称:Caliginous,代码行数:9,代码来源:World.cs

示例5: Hitdetecion

 public static void Hitdetecion(Moveable obj, Misc.Quad[,] objlist)
 {
     foreach(Misc.Quad xobj in objlist) {
         if(obj.Bounds.IntersectsWith(obj.Bounds)) {
             obj.Direction = new OpenTK.Vector2(0, 0);
         }
     }
 }
开发者ID:Erlisch,项目名称:Caliginous,代码行数:8,代码来源:Collision.cs

示例6: Clone

	public override Item Clone ()
	{
		Misc item = new Misc();
		base.CloneBase(item);

		//copy all vars before return
		return item;
	}
开发者ID:Gapti,项目名称:INT-Marks,代码行数:8,代码来源:Misc.cs

示例7: calculateKernelsForPositions

        public void calculateKernelsForPositions(Map2d<float> map, ref Misc.Vector2<int>[] kernelPositions, ref float[] kernelValues )
        {
            int i;

            for( i = 0; i < kernelPositions.Length; i++ )
            {
                kernelValues[i] = multiplyKernelWithMapAtCenter(kernelPositions[i].x, kernelPositions[i].y, map);
            }
        }
开发者ID:PtrMan,项目名称:ai2,代码行数:9,代码来源:RadialKernelDetector.cs

示例8: handleRequest

 public static void handleRequest(string pluginid, Connector conn, ref Misc.PageElements pageElements, HttpRequest request, HttpResponse response)
 {
     switch (request.QueryString["page"])
     {
         case "captcha":
             if (!Core.settings[SETTINGS_KEY].getBool(SETTINGS_KEY_CAPTCHA_ENABLED)) return;
             pageCaptcha(pluginid, conn, ref pageElements, request, response);
             break;
     }
 }
开发者ID:kassemshehady,项目名称:Uber-CMS,代码行数:10,代码来源:Common.cs

示例9: Formatting

        /// <summary>
        /// A text formatting.
        /// </summary>
        public Formatting()
        {
            capsStyle = CapsStyle.none;
            strikethrough = StrikeThrough.none;
            script = Script.none;
            highlight = Highlight.none;
            underlineStyle = UnderlineStyle.none;
            misc = Misc.none;

            rPr = new XElement(XName.Get("rPr", DocX.w.NamespaceName));
        }
开发者ID:JonKruger,项目名称:DocX,代码行数:14,代码来源:Formatting.cs

示例10: CreateList

 public static Misc.TList CreateList(Misc.TFrequency frequency)
 {
     Misc.TList L = new Misc.TList();
     for (int i = 0; i < 255; i++)
     {
         if (frequency[i] > 0)
         {
             InsertAddTList(ref L, frequency[i], Convert.ToChar(i));
         }
     }
     return L;
 }
开发者ID:Zboubinours,项目名称:tp,代码行数:12,代码来源:Compression.cs

示例11: GetTransformRelative

        /// <summary>
        /// Internal method to get the transform relative to a bounding box
        /// </summary>
        /// <param name="bounds">The bounding box to transform relative to</param>
        /// <returns>A transform that is relative to a bounding box</returns>
        internal override Matrix3x2 GetTransformRelative(Misc.RectangleF bounds)
        {
            /* Find the relative center on the X axis */
            float centerX = bounds.X + (CenterX * bounds.Width);

            /* Find the relative center on the Y axis */
            float centerY = bounds.Y + (CenterY * bounds.Height);

            /* Create the rotation transform matrix */
            var transform = Matrix3x2.Rotation(Angle, new PointF(centerX, centerY));
          
            return transform;
        }
开发者ID:treytomes,项目名称:DirectCanvas,代码行数:18,代码来源:RotateTransform.cs

示例12: Formatting

        /// <summary>
        /// A text formatting.
        /// </summary>
        public Formatting()
        {
            capsStyle = CapsStyle.none;
            strikethrough = StrikeThrough.none;
            script = Script.none;
            highlight = Highlight.none;
            underlineStyle = UnderlineStyle.none;
            misc = Misc.none;

            // Use current culture by default
            language = CultureInfo.CurrentCulture;

            rPr = new XElement(XName.Get("rPr", DocX.w.NamespaceName));
        }
开发者ID:Johnnyfly,项目名称:source20131023,代码行数:17,代码来源:Formatting.cs

示例13: mon_clear_timed

        /**
         * Clears the timed effect `ef_idx`.
         *
         * Returns true if the monster's timer was changed.
         */
        public static bool mon_clear_timed(int m_idx, Misc.MON_TMD ef_idx, ushort flag, bool id)
        {
            Monster m_ptr;

            Misc.assert(ef_idx >= 0 && ef_idx < Misc.MON_TMD.MAX);

            Misc.assert(m_idx > 0);
            m_ptr = Cave.cave_monster(Cave.cave, m_idx);

            if (m_ptr.m_timed[(int)ef_idx] == 0) return false;

            /* Clearing never fails */
            flag |= Misc.MON_TMD_FLG_NOFAIL;

            return mon_set_timed(m_ptr, ef_idx, 0, flag, id);
        }
开发者ID:jobjingjo,项目名称:csangband,代码行数:21,代码来源:Monster_Timed.cs

示例14: handleRequest

 public static void handleRequest(string pluginid, Connector conn, ref Misc.PageElements pageElements, HttpRequest request, HttpResponse response)
 {
     // Toggle cookie-control
     HttpCookie cookie = request.Cookies["cookie-control"];
     if (cookie != null)
     {
         cookie.Expires = DateTime.Now.AddDays(-1);
         response.Cookies.Add(cookie);
     }
     else
         response.Cookies.Add(new HttpCookie("cookie-control", "1"));
     // Redirect to the origin or homepage
     if (request.UrlReferrer != null)
         response.Redirect(request.UrlReferrer.AbsoluteUri);
     else
         response.Redirect(pageElements["URL"]);
 }
开发者ID:kassemshehady,项目名称:Uber-CMS,代码行数:17,代码来源:Base.cs

示例15: CreateTree

 public static Misc.TBinaryTree CreateTree(Misc.TList list)
 {
     while (list.Next.Weight > 0)
     {
         if (list.Next.Weight <= list.Weight)
         {
             list.Tree.Left = list.Next.Tree;
             list.Tree.Right = list.Tree;
         }
         else
         {
             list.Tree.Right = list.Next.Tree;
             list.Tree.Left = list.Tree;
         }
         list.Tree.Key = '\0';
         list.Weight += list.Next.Weight;
         list = list.Next;
     }
     return list.Tree;
 }
开发者ID:Zboubinours,项目名称:tp,代码行数:20,代码来源:Compression.cs


注:本文中的Misc类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。