zoukankan      html  css  js  c++  java
  • 8月28日至9月3日备忘录

    1)虚函数virtual和override的使用。

    2)Path.ChangeExtension(destinationFileName,stringExtensionChanged);

    3)File.Exist()备忘录

    4)字体Font的使用,Font font=new Font("KaiTi",12);

    5)画刷的使用:

      eg1:Brush brush=new Brush(Color.Azure);

      eg2:Brush brush=new HatchBrush(HatchStyle.Vertical, Color.FromArgb(128, Color.LightBlue),Color.FromArgb(128,Color.LightGray));

    6)Color的使用,Color.FromArgb(int,Color);

    7)矢量图形的格式化,StringFormate stringFormate=new StringFormate(){Alignment=StringAligment.Center,LineAligment=StringAligment.Center};

    8)Graphics的使用,Graphics graphics=new Graphics();

      eg1:g.DrawString(stringText,font,brush,rectangle,stringFormate);

      eg2:g.FillRectangle(brush,rectangle);

      eg3:g.DrawRectangle(p, rectangle.X,rectangle.Y,rectangle.Width,rectangle.Height);

    9)MVP模式下manager在注销(CleanUp)时需注意对成员变量的恢复默认值。

    10)避免窗口传递参数的耦合,使用数据结构传值,如,类、结构体、布尔值。根据数据结构值,避免复杂的逻辑判断,便于分类处理业务逻辑。

    11)对于UI数据的缓存处理,应直接针对已缓存的数据,避免新创建成员变量进行特殊数据缓存便于调用,看似减少操作,实则消耗内存。

    12)多了平行界面调用同一个业务处理方法,应将该方法置于公有类中调用,避免放在某个界面的类中处理。

    墨匠
  • 相关阅读:
    zoj 3279 线段树 OR 树状数组
    fzu 1962 树状数组 OR 线段树
    hdu 5057 块状链表
    hdu3487 Play with Chain
    bzoj 1588营业额统计(HNOI 2002)
    poj2823 Sliding Window
    poj2828 Buy Tickets
    poj2395 Out of Hay
    poj3667 Hotel
    poj1703 Lost Cows
  • 原文地址:https://www.cnblogs.com/Jashinck/p/7472538.html
Copyright © 2011-2022 走看看