프로젝트

일반

사용자정보

개정판 661b7416

ID661b7416598de29c8ba957a702c8b0b2135eda3f
상위 8c66babd
하위 5529d2a2

백흠경이(가) 5년 이상 전에 추가함

issue #999: Add FromString to all of controls

Change-Id: I64093e34a5f9e8d367cbed769ff4db8d7472cb7a

차이점 보기:

MarkupToPDF/Controls/Text/ArrowTextControl.cs
1137 1137

  
1138 1138
        #endregion
1139 1139

  
1140
        public void SetArrowTextPath()
1140
        private void SetArrowTextPath()
1141 1141
        {
1142 1142
            instanceGroup.Children.Clear();
1143 1143

  
......
1898 1898
            };
1899 1899
        }
1900 1900

  
1901
        /// <summary>
1902
        /// create a arrowtextcontrol from given string
1903
        /// </summary>
1904
        /// <param name="str"></param>
1905
        /// <returns></returns>
1906
        public static ArrowTextControl FromString(string str, SolidColorBrush brush, string sProjectNo)
1907
        {
1908
            ArrowTextControl instance = null;
1909
            using (S_ArrowTextControl s = JsonSerializerHelper.JsonDeserialize<S_ArrowTextControl>(str))
1910
            {
1911
                string[] data2 = s.SizeSet.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries);
1912
                instance = new ArrowTextControl();
1913
                instance.LineSize = Convert.ToDouble(data2.First());
1914
                instance.PointSet = s.PointSet;
1915
                instance.StartPoint = s.StartPoint;
1916
                instance.EndPoint = s.EndPoint;
1917
                instance.StrokeColor = brush;
1918
                //instance.DashSize = s.DashSize;
1919
                instance.ArrowTextStyle = s.ArrowStyle;
1920
                instance.isHighLight = s.isHighLight;
1921
                instance.ArrowText = s.ArrowText;
1922
                instance.Opacity = s.Opac;
1923
                instance.BorderSize = s.BorderSize;
1924
                instance.BoxWidth = s.BoxWidth;
1925
                instance.BoxHeight = s.BoxHeight;
1926
                instance.isFixed = s.isFixed;
1927
                instance.Angle = s.Angle;
1928
                instance.UserID = s.UserID;
1929
                instance.isTrans = s.isTrans;
1930
                instance.MidPoint = s.MidPoint;
1931
                instance.Memo = s.Memo;
1932
                if (s.fontConfig == null || s.fontConfig.ToList().Count == 0)
1933
                {
1934
                    s.fontConfig = new List<string>();
1935

  
1936
                    s.fontConfig.Add("Arial");
1937
                    s.fontConfig.Add("Normal");
1938
                    s.fontConfig.Add("Normal");
1939
                    s.fontConfig.Add("30");
1940
                }
1941
                instance.TextFamily = new FontFamily(s.fontConfig[0]);
1942
                //인구 추가(2018.04.17)
1943
                instance.TextStyle = StringToFont.ConFontStyle(s.fontConfig[1]);
1944
                instance.TextWeight = StringToFont.ConFontWeight(s.fontConfig[2]);
1945
                instance.TextSize = Convert.ToDouble(s.fontConfig[3]);
1946

  
1947
                if (s.fontConfig.Count() == 5)
1948
                {
1949
                    instance.UnderLine = TextDecorations.Underline;
1950
                }
1951
            }
1952

  
1953
            return instance;
1954
        }
1955

  
1901 1956
        #region Dispose
1902 1957
        public void Dispose()
1903 1958
        {

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)