コード例 #1
0
ファイル: WdListView.cs プロジェクト: mshoji/WithDelegate
 public void WdColumnsAdd(string text, int width, System.Windows.Forms.HorizontalAlignment textAlign)
 // Since ColumnsAdd exists, it was referred to as WdColumnsAdd.
 {
     if (this.InvokeRequired)
     {
         WdColumnsAddCallback5 d = new WdColumnsAddCallback5(WdColumnsAdd);
         this.Invoke(d, new object[] { text, width, textAlign });
     }
     else
     {
         this.Columns.Add(text, width, textAlign);
     }
 }
コード例 #2
0
ファイル: wFontDrawing.cs プロジェクト: pm-Architect/Aviary
        public wFontDrawing(string FontName, double FontSize, wColor color, Justification FontJustification)
        {
            Name = FontName;
            Size = FontSize;

            FontColor = color;
            Justify   = FontJustification;

            HAlign = textHjust((int)Justify);
            VAlign = textVjust((int)Justify);

            UpdateFont();
        }
コード例 #3
0
        public static HorizontalAlign ToEto(this swf.HorizontalAlignment align)
        {
            switch (align)
            {
            case swf.HorizontalAlignment.Center:
                return(HorizontalAlign.Center);

            case swf.HorizontalAlignment.Left:
                return(HorizontalAlign.Left);

            case swf.HorizontalAlignment.Right:
                return(HorizontalAlign.Right);

            default:
                throw new NotSupportedException();
            }
        }
コード例 #4
0
ファイル: wFontDrawing.cs プロジェクト: pm-Architect/Aviary
        public wFontDrawing(string FontName, double FontSize, wColor color, Justification FontJustification, bool isBold, bool isItalic, bool isUnderlined, bool isStrikethrough)
        {
            Name = FontName;
            Size = FontSize;

            FontColor = color;
            Justify   = FontJustification;

            IsBold          = isBold;
            IsItalic        = isItalic;
            IsUnderlined    = isUnderlined;
            IsStrikethrough = isStrikethrough;

            HAlign = textHjust((int)Justify);
            VAlign = textVjust((int)Justify);

            UpdateFont();
        }
コード例 #5
0
ファイル: frmMainBase.cs プロジェクト: rodzflores/poultry
        protected void setListviewHeader(System.Windows.Forms.ListView lsv)
        {
            if(header_title.Count>0){
                //loop through the element in array arguments
                for (int i = 0; i < header_title.Count; i++)
                {
                    //assigning value to temp_alignment var;
                    System.Windows.Forms.HorizontalAlignment temp_alignment = new System.Windows.Forms.HorizontalAlignment();
                    if (alignment[i] == "l") { temp_alignment = System.Windows.Forms.HorizontalAlignment.Left; }
                    else if (alignment[i] == "r") { temp_alignment = System.Windows.Forms.HorizontalAlignment.Right; }
                    else { temp_alignment = System.Windows.Forms.HorizontalAlignment.Center; }

                    //adding column header to listview
                    lsv.Columns.Add(header_title[i].ToString(), header_width[i], temp_alignment);
                }
            }
            else{
                MessageBox.Show("Column Header attribute not set");
            }
        }