프로젝트

일반

사용자정보

개정판 63f7c1b3

ID63f7c1b3f8bc6cd89e92c1264b60c08506e66764
상위 a70b7d46
하위 94336a85

김태성이(가) 5년 이상 전에 추가함

markuptoPDF 수정

Change-Id: I027ae4fad7928df45cb14cf7676feaa33743802a

차이점 보기:

KCOM_Backup_2019.09.26_03.36.14/AbstractDatabase.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Web;
5
using System.Data;
6
using System.Data.Common;
7

  
8
namespace KCOM
9
{
10
    public class ColInfo
11
    {
12
        public string Name { get; set; }
13
        public string DataType { get; set; }
14
    }
15

  
16
    /// <summary>
17
    /// Abstract base class for encapsulating provider independant database interactin logic.
18
    /// </summary>
19
    /// <remarks>Version 2.0</remarks>
20
    /// <typeparam name="CONNECTION_TYPE"><see cref="DbConnection"/> derived Connection type.</typeparam>
21
    /// <typeparam name="COMMAND_TYPE"><see cref="DbCommand"/> derived Command type.</typeparam>
22
    /// <typeparam name="ADAPTER_TYPE"><see cref="DbDataAdapater"/> derived Data Adapter type.</typeparam>
23
    public abstract class AbstractDatabase<CONNECTION_TYPE, COMMAND_TYPE, ADAPTER_TYPE> : IDisposable, IAbstractDatabase
24
        where CONNECTION_TYPE : DbConnection, new()
25
        where COMMAND_TYPE : DbCommand
26
        where ADAPTER_TYPE : DbDataAdapter, new()
27
    {
28
        #region : Connection :
29

  
30
        /// <summary>Gets the Connection object associated with the current instance.</summary>
31
        public DbConnection Connection
32
        {
33
            get
34
            {
35
                if (internal_currentConnection == null)
36
                {
37
                    internal_currentConnection = new CONNECTION_TYPE() { ConnectionString = GetConnectionString() };
38
                }
39
                return internal_currentConnection;
40
            }
41
        }
42
        private DbConnection internal_currentConnection = null;
43

  
44
        /// <summary>When overridden in derived classes returns the connection string for the database.</summary>
45
        /// <returns>The connection string for the database.</returns>
46
        protected abstract string GetConnectionString();
47

  
48
        #endregion
49

  
50
        #region : Commands :
51

  
52
        /// <summary>Gets a DbCommand object with the specified <see cref="DbCommand.CommandText"/>.</summary>
53
        /// <param name="sqlString">The SQL string.</param>
54
        /// <returns>A DbCommand object with the specified <see cref="DbCommand.CommandText"/>.</returns>
55
        public DbCommand GetSqlStringCommand(string sqlString)
56
        {
57
            if (this.Connection.State != ConnectionState.Open)
58
                this.Connection.Open();
59

  
60
            DbCommand cmd = this.Connection.CreateCommand();
61
            cmd.CommandType = CommandType.Text;
62
            cmd.CommandText = sqlString;
63
            cmd.CommandTimeout = 600; // 15.11.04 added by soohyun - Extend Time out of query
64
            return cmd;
65
        }
66

  
67
        /// <summary>Gets a DbCommand object with the specified <see cref="DbCommand.CommandText"/>.</summary>
68
        /// <param name="sqlStringFormat">The SQL string format.</param>
69
        /// <param name="args">The format arguments.</param>
70
        /// <returns>A DbCommand object with the specified <see cref="DbCommand.CommandText"/>.</returns>
71
        public DbCommand GetSqlStringCommand(string sqlStringFormat, params object[] args)
72
        {
73
            return GetSqlStringCommand(string.Format(sqlStringFormat, args));
74
        }
75

  
76
        /// <summary>Gets a DbCommand object for the specified Stored Procedure.</summary>
77
        /// <param name="storedProcName">The name of the stored procedure.</param>
78
        /// <returns>A DbCommand object for the specified Stored Procedure.</returns>
79
        public DbCommand GetStoredProcedureCommand(string storedProcName)
80
        {
81
            if (this.Connection.State != ConnectionState.Open)
82
                this.Connection.Open();
83

  
84
            DbCommand cmd = this.Connection.CreateCommand();
85
            cmd.CommandType = CommandType.StoredProcedure;
86
            cmd.CommandText = storedProcName;
87
            return cmd;
88
        }
89

  
90
        #region : Parameters :
91

  
92
        /// <summary>Adds an input parameter to the given <see cref="DbCommand"/>.</summary>
93
        /// <param name="cmd">The command object the parameter should be added to.</param>
94
        /// <param name="paramName">The identifier of the parameter.</param>
95
        /// <param name="paramType">The type of the parameter.</param>
96
        /// <param name="value">The value of the parameter.</param>
97
        /// <returns>The <see cref="DbParameter"/> that was created.</returns>
98
        public DbParameter AddInParameter(DbCommand cmd, string paramName, DbType paramType, object value)
99
        {
100
            return AddParameter(cmd, paramName, paramType, ParameterDirection.Input, value);
101
        }
102

  
103
        /// <summary>Adds an input parameter to the given <see cref="DbCommand"/>.</summary>
104
        /// <param name="cmd">The command object the parameter should be added to.</param>
105
        /// <param name="paramName">The identifier of the parameter.</param>
106
        /// <param name="paramType">The type of the parameter.</param>
107
        /// <param name="size">The maximum size in bytes, of the data table column to be affected.</param>
108
        /// <param name="value">The value of the parameter.</param>
109
        /// <returns>The <see cref="DbParameter"/> that was created.</returns>
110
        public DbParameter AddInParameter(DbCommand cmd, string paramName, DbType paramType, int size, object value)
111
        {
112
            DbParameter param = AddInParameter(cmd, paramName, paramType, value);
113
            param.Size = size;
114
            cmd.Parameters.Add(param);
115
            return param;
116
        }
117

  
118
        /// <summary>Adds the out parameter to the given <see cref="DbCommand"/></summary>
119
        /// <param name="cmd">The command object the parameter should be added to.</param>
120
        /// <param name="paramName">The identifier of the parameter.</param>
121
        /// <param name="paramType">The type of the parameter.</param>
122
        /// <param name="value">The value of the parameter.</param>
123
        /// <returns>The <see cref="DbParameter"/> that was created.</returns>
124
        public DbParameter AddOutParameter(DbCommand cmd, string paramName, DbType paramType, object value)
125
        {
126
            return AddParameter(cmd, paramName, paramType, ParameterDirection.Output, value);
127
        }
128

  
129
        /// <summary>Adds a parameter to the given <see cref="DbCommand"/>.</summary>
130
        /// <param name="cmd">The command object the parameter should be added to.</param>
131
        /// <param name="paramName">The identifier of the parameter.</param>
132
        /// <param name="paramType">The type of the parameter.</param>
133
        /// <param name="direction"><see cref="ParameterDirection"/> of the parameter.</param>
134
        /// <param name="value">The value of the parameter.</param>
135
        /// <returns>The <see cref="DbParameter"/> that was created.</returns>
136
        public DbParameter AddParameter(DbCommand cmd, string paramName,
137
                                            DbType paramType,
138
                                            ParameterDirection direction,
139
                                            object value)
140
        {
141
            DbParameter param = cmd.CreateParameter();
142
            param.DbType = paramType;
143
            param.ParameterName = paramName;
144
            param.Value = value;
145
            param.Direction = direction;
146
            cmd.Parameters.Add(param);
147
            return param;
148
        }
149

  
150
        /// <summary>Adds a parameter to the given <see cref="DbCommand"/>.</summary>
151
        /// <param name="cmd">The command object the parameter should be added to.</param>
152
        /// <param name="paramName">The identifier of the parameter.</param>
153
        /// <param name="paramType">The type of the parameter.</param>
154
        /// <param name="direction"><see cref="ParameterDirection"/> of the parameter.</param>
155
        /// <param name="size">The maximum size in bytes, of the data table column to be affected.</param>
156
        /// <param name="value">The value of the parameter.</param>
157
        /// <returns>The <see cref="DbParameter"/> that was created.</returns>
158
        public DbParameter AddParameter(DbCommand cmd, string paramName,
159
                                            DbType paramType,
160
                                            ParameterDirection direction,
161
                                            int size,
162
                                            object value)
163
        {
164
            DbParameter param = AddParameter(cmd, paramName, paramType, direction, value);
165
            param.Size = size;
166
            return param;
167
        }
168

  
169
        #endregion
170

  
171
        #region : Executes :
172

  
173
        /// <summary>Executes the specified command against the current connection.</summary>
174
        /// <param name="cmd">The command to be executed.</param>
175
        /// <returns>Result returned by the database engine.</returns>
176
        public int ExecuteNonQuery(DbCommand cmd)
177
        {
178
            if (this.Connection.State != ConnectionState.Open)
179
                this.Connection.Open();
180

  
181
            return cmd.ExecuteNonQuery();
182
        }
183

  
184
        public int ExecuteNonQuery(string sSql)
185
        {
186
            if (this.Connection.State != ConnectionState.Open)
187
                this.Connection.Open();
188

  
189
            return GetSqlStringCommand(sSql).ExecuteNonQuery();
190
        }
191

  
192
        /// <summary>Executes the specified command against the current connection.</summary>
193
        /// <param name="cmd">The command to be executed.</param>
194
        /// <param name="txn">The database transaction inside which the command should be executed.</param>
195
        /// <returns>Result returned by the database engine.</returns>
196
        public int ExecuteNonQuery(DbCommand cmd, DbTransaction txn)
197
        {
198
            if (this.Connection.State != ConnectionState.Open)
199
                this.Connection.Open();
200

  
201
            cmd.Transaction = txn;
202
            return cmd.ExecuteNonQuery();
203
        }
204

  
205
        /// <summary>Executes the specified command against the current connection.</summary>
206
        /// <param name="cmd">The command to be executed.</param>
207
        /// <returns>Result returned by the database engine.</returns>
208
        public DbDataReader ExecuteReader(DbCommand cmd)
209
        {
210
            if (this.Connection.State != ConnectionState.Open)
211
                this.Connection.Open();
212

  
213
            return cmd.ExecuteReader();
214
        }
215

  
216
        /// <summary>Executes the specified command against the current connection.</summary>
217
        /// <param name="cmd">The command to be executed.</param>
218
        /// <param name="behavior">One of the <see cref="System.Data.CommandBehavior"/> values.</param>
219
        /// <returns>Result returned by the database engine.</returns>
220
        public DbDataReader ExecuteReader(DbCommand cmd, CommandBehavior behavior)
221
        {
222
            if (this.Connection.State != ConnectionState.Open)
223
                this.Connection.Open();
224

  
225
            return cmd.ExecuteReader(behavior);
226
        }
227

  
228
        /// <summary>Executes the specified command against the current connection.</summary>
229
        /// <param name="cmd">The command to be executed.</param>
230
        /// <returns>Result returned by the database engine.</returns>
231
        public T ExecuteScalar<T>(DbCommand cmd, T defaultValue)
232
        {
233
            if (this.Connection.State != ConnectionState.Open)
234
                this.Connection.Open();
235

  
236
            object retVal = cmd.ExecuteScalar();
237
            if (null == retVal || DBNull.Value == retVal)
238
                return defaultValue;
239
            else
240
                return (T)retVal;
241
        }
242

  
243
        /// <summary>Executes the specified command against the current connection.</summary>
244
        /// <param name="cmd">The command to be executed.</param>
245
        /// <returns>Result returned by the database engine.</returns>
246
        public DataSet ExecuteDataSet(DbCommand cmd, DbTransaction txn = null)
247
        {
248
            ADAPTER_TYPE adapter = new ADAPTER_TYPE();
249
            if (null != txn) cmd.Transaction = txn;
250
            adapter.SelectCommand = (COMMAND_TYPE)cmd;
251

  
252
            DataSet retVal = new DataSet()
253
            {
254
                Locale = System.Globalization.CultureInfo.InvariantCulture
255
            };
256
            adapter.Fill(retVal);
257
            return retVal;
258
        }
259

  
260
        #endregion
261

  
262
        #endregion
263

  
264
        /// <summary>Begins a transaction.</summary>
265
        /// <returns>Created transaction.</returns>
266
        public DbTransaction BeginTransaction()
267
        {
268
            if (this.Connection.State != ConnectionState.Open)
269
                this.Connection.Open();
270
            return Connection.BeginTransaction();
271
        }
272

  
273
        #region : Consturction / Destruction :
274

  
275
        /// <summary>Disposes the resources associated with the current database connection.</summary>
276
        ~AbstractDatabase()
277
        {
278
            Dispose();
279
        }
280

  
281
        #region IDisposable Members
282

  
283
        /// <summary>Disposes the resources associated with the current database connection.</summary>
284
        public void Dispose()
285
        {
286
            if (null != internal_currentConnection)
287
            {
288
                internal_currentConnection.Dispose();
289
                internal_currentConnection = null;
290
            }
291
        }
292

  
293
        #endregion
294

  
295
        #endregion
296
    }
297
}
KCOM_Backup_2019.09.26_03.36.14/App.xaml
1
<Application
2
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
             xmlns:local="clr-namespace:KCOM"
5
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="KCOM.App"
6
             StartupUri="MainWindow.xaml">
7
    <Application.Resources>
8
        <ResourceDictionary>
9
            <ResourceDictionary.MergedDictionaries>
10
                <ResourceDictionary Source="Resources\Theme_Color.xaml"/>
11
                <ResourceDictionary/>
12
                <ResourceDictionary Source="Resources\DecodeImageTemplate.xaml"/>
13
                <ResourceDictionary Source="Resources\Theme_CustomControl.xaml"/>
14
                <ResourceDictionary Source="Assets\RadGridViewStyleResourceDictionary.xaml"/>
15
                <ResourceDictionary Source="Messenger\StyleDictionary.xaml"/>
16
                <ResourceDictionary Source="/MarkupToPDF;component/themes/generic.xaml"/>
17
                <!--<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/System.Windows.xaml"/>
18
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.xaml"/>
19
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
20
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>
21
                <ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>-->
22

  
23
                <!--<ResourceDictionary Source="/Telerik.Windows.Themes.Office2016;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>-->
24
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/System.Windows.xaml"/>
25
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.xaml"/>
26
                <ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Input.xaml"/>
27
                <!--<ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.RibbonView.xaml"/>-->
28
                <!--<ResourceDictionary Source="/Telerik.Windows.Themes.VisualStudio2013;component/Themes/Telerik.Windows.Controls.Docking.xaml"/>-->
29
            </ResourceDictionary.MergedDictionaries>
30
        </ResourceDictionary>
31
    </Application.Resources>
32
</Application>
KCOM_Backup_2019.09.26_03.36.14/App.xaml.cs
1

2
using KCOM.Common;
3
using KCOM.ServiceDeepView;
4
using System;
5
using System.Collections.Generic;
6
using System.ComponentModel;
7
using System.Configuration;
8
using System.Data;
9
using System.Diagnostics;
10
using System.IO;
11
using System.Linq;
12
using System.Net;
13
using System.Reflection;
14
using System.Runtime.CompilerServices;
15
using System.ServiceModel;
16
using System.Windows;
17
using System.Xml;
18
using log4net;
19
using System.Text;
20
using System.Runtime.InteropServices;
21
using KCOM.Views;
22
using System.Threading.Tasks;
23

  
24
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
25
namespace KCOM
26
{
27
    public class OpenProperties
28
    {
29
        public string DocumentItemID { get; set; }
30
        public bool bPartner { get; set; }
31
        public bool CreateFinalPDFPermission { get; set; }
32
        public bool NewCommentPermission { get; set; }
33
        public string ProjectNO { get; set; }
34
        public string UserID { get; set; }
35
        public int Mode { get; set; }
36

  
37
        /// <summary>
38
        /// pemss에서 전달되는 ID
39
        /// </summary>
40
        public string pId { get; set; }
41

  
42
        /// <summary>
43
        /// pemss에서 전달되는 ID
44
        /// </summary>
45
        public string uId { get; set; }
46

  
47
        public string cId { get; set; }
48
    }
49
    /// <summary>
50
    /// App.xaml에 대한 상호 작용 논리
51
    /// </summary>
52
    public partial class App : Application
53
    {
54
        public static bool IsDesignMode
55
        {
56
            get
57
            {
58
                return DesignerProperties.GetIsInDesignMode(new DependencyObject());
59
            }
60
            private set { }
61
        }
62

  
63
        public static BasicHttpBinding _binding;
64
        public static EndpointAddress _EndPoint;
65
        public static EndpointAddress _PemssEndPoint;
66
        public static EndpointAddress _EndPoint_SaveLoad;
67
        public static EndpointAddress _EndPoint_Symbol;
68
        public static string UserID;
69
        public static string UserName;
70
        public static string UserIP;
71
        public static IKCOM.ViewInfo ViewInfo;
72
        public static IKCOM.PEMSSInfo PEMSSInfo;
73
        public static string urlHost;
74
        public static string urlPort;
75
        public static string urlHost_DB;
76
        public static string urlPort_DB;
77
        public static string Custom_ViewInfoId;
78
        public static bool ParameterMode = false;
79
        public static bool isExternal = false;
80

  
81
        /// <summary>
82
        /// logger
83
        /// </summary>
84
        public static ILog DBLogger = null;
85
        public static ILog FileLogger = null;
86

  
87
        /// <summary>
88
        /// Application Data Folder
89
        /// </summary>
90
        public static string AppDataFolder
91
        {
92
            get
93
            {
94
                return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "MARKUS");
95
            }
96
        }
97

  
98

  
99
        public static RestSharp.RestClient BaseClient { get; set; }
100
        public static IKCOM.KCOM_SystemInfo SystemInfo { get; set; }
101

  
102

  
103
        private static OpenProperties ParamDecoding(string DecodingText, System.Text.Encoding oEncoding = null)
104
        {
105
            if (oEncoding == null)
106
                oEncoding = System.Text.Encoding.UTF8;
107

  
108
            byte[] byteArray = Convert.FromBase64String(DecodingText);
109

  
110
            string jsonBack = oEncoding.GetString(byteArray);
111

  
112
            return Newtonsoft.Json.JsonConvert.DeserializeObject<OpenProperties>(jsonBack);
113
        }
114

  
115
        private string versionPath = null;
116
        //public SplashScreen splash = new SplashScreen("splash.png");
117
        public static SplashScreenWindow splashScreen = new SplashScreenWindow();
118

  
119
        public App()
120
        {
121
            Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Telerik.Windows.Controls.VisualStudio2013Theme();
122
        }
123

  
124
        protected override async void OnStartup(StartupEventArgs e)
125
        {
126

  
127
            try
128
            {
129

  
130

  
131
                splashScreen.Show();
132

  
133
                /// create log database and table
134
                using (IAbstractDatabase database = new AppSQLiteDatabase() { FilePath = Path.Combine(AppDataFolder, "log4net.db") })
135
                {
136
                    string sSql = "CREATE TABLE IF NOT EXISTS Log (LogId INTEGER PRIMARY KEY,Date DATETIME NOT NULL,Level VARCHAR(50) NOT NULL,Logger VARCHAR(255) NOT NULL,Message TEXT DEFAULT NULL,StackTrace TEXT DEFAULT NULL);";
137
                    database.ExecuteNonQuery(sSql);
138
                }
139
                /// up to here
140
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
141
                log4net.GlobalContext.Properties["LogDBFilePath"] = Path.Combine(AppDataFolder, "log4net.db");
142
                log4net.GlobalContext.Properties["LogFilePath"] = Path.Combine(AppDataFolder, "Log", "log4net.log");
143
                App.DBLogger = LogManager.GetLogger("DBLogger");
144
                App.FileLogger = LogManager.GetLogger("EventLogger");
145

  
146
                #region  //  DNS 체크
147

  
148
                string localdomain = CommonLib.Common.GetConfigString("HOST_DOMAIN", "DOMAIN", "");
149

  
150
                var hostEntry = CommonLib.DNSHelper.GetHostEntryTask();
151

  
152
                if (hostEntry == null)
153
                {
154
                    System.Diagnostics.Debug.WriteLine("(hostEntry == null");
155
                    App.FileLogger.Fatal("hostEntry == null");
156
                    isExternal = true;
157
                }
158
                else if (!hostEntry.HostName.EndsWith(localdomain))
159
                {
160
                    // 외부 사용자
161
                    App.FileLogger.Fatal("hostEntry != localdomain :" + hostEntry.HostName);
162
                    isExternal = true;
163
                }
164
                #endregion
165
                //splash.Show(false, false);                
166

  
167
                if (e.Args.Count() > 0)
168
                {
169
                    var result = ParamDecoding(e.Args[0].Replace(@"kcom://", "").Replace(@"/", ""));
170
                    App.ViewInfo = new IKCOM.ViewInfo
171
                    {
172
                        DocumentItemID = result.DocumentItemID,
173
                        EnsembleID = result.DocumentItemID,
174
                        //DocumentItemID = "10001",
175
                        bPartner = result.bPartner,
176
                        CreateFinalPDFPermission = result.CreateFinalPDFPermission,
177
                        NewCommentPermission = result.NewCommentPermission,
178
                        ProjectNO = result.ProjectNO,
179
                        UserID = result.UserID,
180
                        //UserID = "H2009115",
181
                        //Mode = 0 , 1 , 2
182
                    };
183

  
184
                    App.PEMSSInfo = new IKCOM.PEMSSInfo
185
                    {
186
                        UserID = result.uId,
187
                        CommentID = result.cId
188
                    };
189

  
190
                    ParameterMode = true;
191
                }
192
                else
193
                {
194
                    string[] strArg = Environment.GetCommandLineArgs();
195
                    if (strArg.Length > 1)
196
                    {
197
                        //label1.Text = strArg[1];
198

  
199
                        var result = ParamDecoding(strArg[1].Replace(@"kcom://", "").Replace(@"/", ""));
200
                        App.ViewInfo = new IKCOM.ViewInfo
201
                        {
202
                            DocumentItemID = result.DocumentItemID,
203
                            EnsembleID = result.DocumentItemID,
204
                            //DocumentItemID = "10001",
205
                            bPartner = result.bPartner,
206
                            CreateFinalPDFPermission = result.CreateFinalPDFPermission,
207
                            NewCommentPermission = result.NewCommentPermission,
208
                            ProjectNO = result.ProjectNO,
209
                            UserID = result.UserID,
210
                            //UserID = "H2009115",
211
                            //Mode = 0 , 1 , 2
212
                        };
213

  
214
                        App.PEMSSInfo = new IKCOM.PEMSSInfo
215
                        {
216
                            UserID = result.uId
217
                        };
218

  
219
                        ParameterMode = true;
220
                    }
221
                }
222

  
223
                //App.ViewInfo.CreateFinalPDFPermission = false;
224
                //App.ViewInfo.NewCommentPermission = false;
225
                //GetQueryStringParameters();
226
                _binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
227
                _binding.MaxBufferSize = 2147483647;
228
                _binding.MaxReceivedMessageSize = 2147483647;
229
                _binding.OpenTimeout = new TimeSpan(0, 1, 0);
230
                _binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
231
                _binding.CloseTimeout = new TimeSpan(0, 5, 0);
232
                _binding.SendTimeout = new TimeSpan(0, 5, 0);
233
                _binding.TextEncoding = System.Text.Encoding.UTF8;
234
                _binding.TransferMode = TransferMode.Buffered;
235
                //Support.SetLicense();
236

  
237
                string sBaseServiceURL = string.Empty;//CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "");
238

  
239
#if DEBUG
240
                //sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
241
                System.Diagnostics.Debug.WriteLine("sBaseServiceURL");
242
                sBaseServiceURL = CommonLib.Common.GetConfigString("Debug_BaseClientAddress", "URL", "", isExternal);
243
#else
244
                sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
245
#endif
246

  
247
                _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL));
248

  
249
#if DEBUG
250
                _PemssEndPoint = new EndpointAddress(string.Format("{0}/PemssService.svc", "http://localhost:13009"));
251
#else
252
                          _PemssEndPoint = new EndpointAddress(string.Format("{0}/PemssService.svc", sBaseServiceURL));
253
#endif
254

  
255
                await SplashScreenAsnyc();
256
                base.OnStartup(e);
257

  
258
                //this.MainWindow = new MainWindow();
259

  
260
            }
261
            catch (Exception ex)
262
            {
263
                MessageBox.Show("Err:" + ex.ToString());
264
            }
265
            finally
266
            {
267
                await SplashScreenAsnyc();
268
            }
269
        }
270

  
271
        private async Task<bool> SplashScreenAsnyc()
272
        {
273
            int value = 100 / ISplashMessage.SplashMessageCnt;
274

  
275
            for (int i = 1; i < ISplashMessage.SplashMessageCnt; i++)
276
            {
277
                System.Threading.Thread.Sleep(3);
278
                await splashScreen.Dispatcher.InvokeAsync(() => splashScreen.Progress = i * value);
279
            }
280

  
281
            splashScreen.Close();
282

  
283
            return true;
284
        }
285

  
286
        public static void splashString(string text)
287
        {
288
            Task.Factory.StartNew(() =>
289
            {
290
                splashScreen.Dispatcher.Invoke(() => splashScreen.SplashText = text);
291
            });
292
        }
293

  
294

  
295
        /// <summary>
296
        /// log unhandled exception
297
        /// </summary>
298
        /// <author>humkyung</author>
299
        /// <date>2019.05.21</date>
300
        /// <param name="sender"></param>
301
        /// <param name="e"></param>
302
        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
303
        {
304
            try
305
            {
306
                App.FileLogger.Fatal(e.ExceptionObject as Exception);
307
                //App.DBLogger.Fatal(e.ExceptionObject as Exception);
308
            }
309
            catch (Exception ex)
310
            {
311
                Console.WriteLine(ex.InnerException?.ToString());
312
            }
313
            finally
314
            {
315
#if RELEASE
316
                Environment.Exit(0);
317
#endif
318
            }
319
        }
320

  
321
        private void ErrorLogFileWrite(string Err)
322
        {
323
            App.FileLogger.Debug(Err);
324
        }
325
    }
326
}
KCOM_Backup_2019.09.26_03.36.14/AppSQLiteDatabase.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Data;
6
using System.Data.Common;
7
using System.Data.SQLite;
8
using System.Globalization;
9

  
10
namespace KCOM
11
{
12
	class AppSQLiteDatabase : AbstractDatabase<SQLiteConnection , SQLiteCommand , SQLiteDataAdapter>
13
	{
14
		public string FilePath{get;set;}
15

  
16
        /// <summary>
17
        /// sqlite connection string
18
        /// </summary>
19
        /// <author>humkyung</author>
20
        /// <date>2019.02.10</date>
21
        /// <returns></returns>
22
        protected override string  GetConnectionString()
23
		{
24
            return string.Format(CultureInfo.CurrentCulture, "Data Source = {0}", this.FilePath);
25
		}
26
    }
27
}
KCOM_Backup_2019.09.26_03.36.14/Assets/HeaderTemplateSelector.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using System.Windows;
7
using System.Windows.Controls;
8

  
9
namespace KCOM.Assets
10
{
11
    public class HeaderTemplateSelector : DataTemplateSelector
12
    {
13
        //public override DataTemplate SelectTemplate(object item, DependencyObject container)
14
        //{
15
        //    //item is null
16
        //    //if (item is Window1.Test)
17
        //    //{
18
        //    //    return App.Current.MainWindow.FindResource("_DataTemplate") as DataTemplate;
19
        //    //}
20
        //    //else
21
        //    //{
22
        //    //    return base.SelectTemplate(item, container);
23
        //    //}
24
        //}
25
    }
26
}
KCOM_Backup_2019.09.26_03.36.14/Assets/MarkupColorListBox.xaml
1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
2
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:System="clr-namespace:System;assembly=mscorlib"
3
                    xmlns:ikcom="clr-namespace:IKCOM;assembly=IKCOM"
4
                    xmlns:local="clr-namespace:KCOM.Assets" xmlns:converter="clr-namespace:KCOM.Common.Converter" xmlns:common="clr-namespace:KCOM.Common">
5
    <ikcom:SetColorMarkupItem x:Key="ColorItemDataSource"  />
6
    <!--  Resource dictionary entries should be defined here.  -->
7
    <converter:StringToColorConverter x:Key="StringToColorConverter" />
8
    <DataTemplate x:Key="MarkupPagesColorItem">
9
        <StackPanel>
10
            <Border Background="{Binding DisplayColor, Converter={StaticResource StringToColorConverter}}">
11
                <TextBlock FontSize="16"
12
                           Foreground="{Binding DisplayColor,
13
                                                Converter={StaticResource StringToColorConverter}}"
14
                           Text="C"
15
                           TextWrapping="Wrap" />
16
            </Border>
17
        </StackPanel>
18
    </DataTemplate>
19
    <ItemsPanelTemplate x:Key="StackListItemsPanelTemplate">
20
        <StackPanel Orientation="Horizontal" />
21
    </ItemsPanelTemplate>
22
    <Style x:Key="NomalListBoxStyle" TargetType="ListBox">
23
        <Setter Property="Padding" Value="0" />
24
        <Setter Property="Background" Value="#FFFFFFFF" />
25
        <Setter Property="Foreground" Value="#FF000000" />
26
        <Setter Property="HorizontalContentAlignment" Value="Left" />
27
        <Setter Property="VerticalContentAlignment" Value="Top" />
28
        <Setter Property="IsTabStop" Value="False" />
29
        <Setter Property="BorderThickness" Value="0" />
30
        <!--<Setter Property="TabNavigation" Value="Once" />-->
31
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
32
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
33
        <Setter Property="BorderBrush">
34
            <Setter.Value>
35
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
36
                    <GradientStop Offset="0" Color="#FFA3AEB9" />
37
                    <GradientStop Offset="0.375" Color="#FF8399A9" />
38
                    <GradientStop Offset="0.375" Color="#FF718597" />
39
                    <GradientStop Offset="1" Color="#FF617584" />
40
                </LinearGradientBrush>
41
            </Setter.Value>
42
        </Setter>
43
        <Setter Property="Template">
44
            <Setter.Value>
45
                <ControlTemplate TargetType="ListBox">
46
                    <Grid>
47
                        <VisualStateManager.VisualStateGroups>
48
                            <VisualStateGroup x:Name="ValidationStates">
49
                                <VisualState x:Name="Valid" />
50
                                <VisualState x:Name="InvalidUnfocused">
51
                                    <Storyboard>
52
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
53
                                            <DiscreteObjectKeyFrame KeyTime="0">
54
                                                <DiscreteObjectKeyFrame.Value>
55
                                                    <Visibility>Visible</Visibility>
56
                                                </DiscreteObjectKeyFrame.Value>
57
                                            </DiscreteObjectKeyFrame>
58
                                        </ObjectAnimationUsingKeyFrames>
59
                                    </Storyboard>
60
                                </VisualState>
61
                                <VisualState x:Name="InvalidFocused">
62
                                    <Storyboard>
63
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
64
                                            <DiscreteObjectKeyFrame KeyTime="0">
65
                                                <DiscreteObjectKeyFrame.Value>
66
                                                    <Visibility>Visible</Visibility>
67
                                                </DiscreteObjectKeyFrame.Value>
68
                                            </DiscreteObjectKeyFrame>
69
                                        </ObjectAnimationUsingKeyFrames>
70
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
71
                                            <DiscreteObjectKeyFrame KeyTime="0">
72
                                                <DiscreteObjectKeyFrame.Value>
73
                                                    <System:Boolean>True</System:Boolean>
74
                                                </DiscreteObjectKeyFrame.Value>
75
                                            </DiscreteObjectKeyFrame>
76
                                        </ObjectAnimationUsingKeyFrames>
77
                                    </Storyboard>
78
                                </VisualState>
79
                            </VisualStateGroup>
80
                        </VisualStateManager.VisualStateGroups>
81
                        <Border CornerRadius="2">
82
                            <!--  <ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Padding="{TemplateBinding Padding}" TabNavigation="{TemplateBinding TabNavigation}" BorderBrush="{x:Null}">  -->
83
                            <ItemsPresenter />
84
                            <!--  </ScrollViewer>  -->
85
                        </Border>
86
                        <Border x:Name="ValidationErrorElement"
87
                                BorderBrush="#FFDB000C"
88
                                BorderThickness="{TemplateBinding BorderThickness}"
89
                                CornerRadius="2"
90
                                Visibility="Collapsed">
91
                            <ToolTipService.ToolTip>
92
                                <ToolTip x:Name="validationTooltip"
93
                                         DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
94
                                         Placement="Right"
95
                                         PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
96
                                         Template="{StaticResource ValidationToolTipTemplate}">
97
                                    <ToolTip.Triggers>
98
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
99
                                            <BeginStoryboard>
100
                                                <Storyboard>
101
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
102
                                                        <DiscreteObjectKeyFrame KeyTime="0">
103
                                                            <DiscreteObjectKeyFrame.Value>
104
                                                                <System:Boolean>true</System:Boolean>
105
                                                            </DiscreteObjectKeyFrame.Value>
106
                                                        </DiscreteObjectKeyFrame>
107
                                                    </ObjectAnimationUsingKeyFrames>
108
                                                </Storyboard>
109
                                            </BeginStoryboard>
110
                                        </EventTrigger>
111
                                    </ToolTip.Triggers>
112
                                </ToolTip>
113
                            </ToolTipService.ToolTip>
114
                            <Grid Width="10"
115
                                  Height="10"
116
                                  Margin="0,-4,-4,0"
117
                                  HorizontalAlignment="Right"
118
                                  VerticalAlignment="Top"
119
                                  Background="Transparent">
120
                                <Path Margin="-1,3,0,0"
121
                                      Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"
122
                                      Fill="#FFDC000C" />
123
                                <Path Margin="-1,3,0,0"
124
                                      Data="M 0,0 L2,0 L 8,6 L8,8"
125
                                      Fill="#ffffff" />
126
                            </Grid>
127
                        </Border>
128
                    </Grid>
129
                </ControlTemplate>
130
            </Setter.Value>
131
        </Setter>
132
    </Style>
133
    <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
134
        <Setter Property="Padding" Value="0" />
135
        <Setter Property="HorizontalContentAlignment" Value="Center" />
136
        <Setter Property="VerticalContentAlignment" Value="Top" />
137
        <Setter Property="Background" Value="Transparent" />
138
        <Setter Property="BorderThickness" Value="0" />
139
        <!--<Setter Property="TabNavigation" Value="Local" />-->
140
        <Setter Property="Template">
141
            <Setter.Value>
142
                <ControlTemplate TargetType="ListBoxItem">
143
                    <Grid Background="{TemplateBinding Background}">
144
                        <VisualStateManager.VisualStateGroups>
145
                            <VisualStateGroup x:Name="CommonStates">
146
                                <VisualState x:Name="Normal" />
147
                                <VisualState x:Name="MouseOver">
148
                                    <Storyboard>
149
                                        <DoubleAnimation Duration="0"
150
                                                         Storyboard.TargetName="fillColor"
151
                                                         Storyboard.TargetProperty="Opacity"
152
                                                         To=".35" />
153
                                    </Storyboard>
154
                                </VisualState>
155
                                <VisualState x:Name="Disabled">
156
                                    <Storyboard>
157
                                        <DoubleAnimation Duration="0"
158
                                                         Storyboard.TargetName="contentPresenter"
159
                                                         Storyboard.TargetProperty="Opacity"
160
                                                         To=".55" />
161
                                    </Storyboard>
162
                                </VisualState>
163
                            </VisualStateGroup>
164
                            <VisualStateGroup x:Name="SelectionStates">
165
                                <VisualState x:Name="Unselected" />
166
                                <VisualState x:Name="Selected">
167
                                    <Storyboard>
168
                                        <DoubleAnimation Duration="0"
169
                                                         Storyboard.TargetName="fillColor2"
170
                                                         Storyboard.TargetProperty="Opacity"
171
                                                         To=".75" />
172
                                    </Storyboard>
173
                                </VisualState>
174
                            </VisualStateGroup>
175
                            <VisualStateGroup x:Name="FocusStates">
176
                                <VisualState x:Name="Focused">
177
                                    <Storyboard>
178
                                        <ObjectAnimationUsingKeyFrames Duration="0"
179
                                                                       Storyboard.TargetName="FocusVisualElement"
180
                                                                       Storyboard.TargetProperty="Visibility">
181
                                            <DiscreteObjectKeyFrame KeyTime="0">
182
                                                <DiscreteObjectKeyFrame.Value>
183
                                                    <Visibility>Visible</Visibility>
184
                                                </DiscreteObjectKeyFrame.Value>
185
                                            </DiscreteObjectKeyFrame>
186
                                        </ObjectAnimationUsingKeyFrames>
187
                                    </Storyboard>
188
                                </VisualState>
189
                                <VisualState x:Name="Unfocused" />
190
                            </VisualStateGroup>
191
                        </VisualStateManager.VisualStateGroups>
192
                        <Rectangle x:Name="fillColor"
193
                                   Fill="#FFBADDE9"
194
                                   IsHitTestVisible="False"
195
                                   Opacity="0"
196
                                   RadiusX="1"
197
                                   RadiusY="1" />
198
                        <Rectangle x:Name="fillColor2"
199
                                   Fill="#FFBADDE9"
200
                                   IsHitTestVisible="False"
201
                                   Opacity="0"
202
                                   RadiusX="1"
203
                                   RadiusY="1" />
204
                        <ContentPresenter x:Name="contentPresenter"
205
                                          HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
206
                                          VerticalAlignment="{TemplateBinding VerticalAlignment}"
207
                                          Content="{TemplateBinding Content}"
208
                                          ContentTemplate="{TemplateBinding ContentTemplate}" />
209
                        <Rectangle x:Name="FocusVisualElement"
210
                                   Stroke="#FF6DBDD1"
211
                                   StrokeThickness="0"
212
                                   Visibility="Collapsed" />
213
                    </Grid>
214
                </ControlTemplate>
215
            </Setter.Value>
216
        </Setter>
217
    </Style>
218
</ResourceDictionary>
KCOM_Backup_2019.09.26_03.36.14/Assets/RadGridViewStyleResourceDictionary.xaml
1
<ResourceDictionary
2
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
3
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
4
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
5
    <!-- Resource dictionary entries should be defined here. -->
6
    <SolidColorBrush x:Key="ControlOuterBorder" Color="#FF848484"/>
7
    <ControlTemplate x:Key="DetailsPresenterTemplate" TargetType="telerik:DetailsPresenter">
8
        <Border x:Name="DetailsBorder" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0" OpacityMask="Black" Background="#FFF3A9A9">
9
            <VisualStateManager.VisualStateGroups>
10
                <VisualStateGroup x:Name="DetailsStates">
11
                    <VisualState x:Name="DetailsVisible">
12
                        <Storyboard>
13
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DetailsBorder">
14
                                <DiscreteObjectKeyFrame KeyTime="0">
15
                                    <DiscreteObjectKeyFrame.Value>
16
                                        <Visibility>Visible</Visibility>
17
                                    </DiscreteObjectKeyFrame.Value>
18
                                </DiscreteObjectKeyFrame>
19
                            </ObjectAnimationUsingKeyFrames>
20
                        </Storyboard>
21
                    </VisualState>
22
                    <VisualState x:Name="DetailsCollapsed"/>
23
                </VisualStateGroup>
24
            </VisualStateManager.VisualStateGroups>
25
            <Border  BorderBrush="#FF728FB6" Margin="0,0,0,0">
26
                <ContentPresenter x:Name="PART_ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
27
            </Border>
28
        </Border>
29
    </ControlTemplate>
30
    <LinearGradientBrush x:Key="GridView_RowDetailsBackground" EndPoint="0.5,1" StartPoint="0.5,0">
31
        <GradientStop Color="#FFC2C2C2"/>
32
        <GradientStop Color="#FFF0F0F0" Offset="0.3"/>
33
    </LinearGradientBrush>
34
    <SolidColorBrush x:Key="ControlInnerBorder" Color="White"/>
35
    <Style x:Key="DetailsPresenterStyle" TargetType="telerik:DetailsPresenter">
36
        <Setter Property="Template" Value="{StaticResource DetailsPresenterTemplate}"/>
37
        <Setter Property="Visibility" Value="Collapsed"/>
38
        <Setter Property="IsTabStop" Value="False"/>
39
        <Setter Property="Background" Value="{StaticResource GridView_RowDetailsBackground}"/>
40
        <Setter Property="BorderBrush" Value="{StaticResource ControlInnerBorder}"/>
41
        <Setter Property="BorderThickness" Value="1"/>
42
        <Setter Property="Padding" Value="0"/>
43
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
44
    </Style>
45
    <SolidColorBrush x:Key="ItemOuterBorder_Over" Color="#93C3F2"/>
46
    <SolidColorBrush x:Key="ItemInnerBorder_Over" Color="#2181FF"/>
47
    <SolidColorBrush x:Key="ItemBackground_Over" Color="Transparent"/>
48
    <SolidColorBrush x:Key="ItemOuterBorder_Selected" Color="#93C3F2"/>
49
    <SolidColorBrush x:Key="ItemInnerBorder_Selected" Color="#2181FF"/>
50
    <SolidColorBrush x:Key="ItemBackground_Selected" Color="Transparent"/>
51
    <SolidColorBrush x:Key="ItemOuterBorder_Invalid" Color="#FFCE7D7D"/>
52
    <LinearGradientBrush x:Key="ItemInnerBorder_Invalid" EndPoint="0.5,1" StartPoint="0.5,0">
53
        <GradientStop Color="#FFEBF4FD"/>
54
        <GradientStop Color="#FFDBEAFD" Offset="1"/>
55
    </LinearGradientBrush>
56
    <LinearGradientBrush x:Key="ItemBackground_Invalid" EndPoint="0.5,1" StartPoint="0.5,0">
57
        <GradientStop Color="#FFFCDCDC"/>
58
        <GradientStop Color="#FFFCC1C1" Offset="1"/>
59
    </LinearGradientBrush>
60
    <telerik:BooleanToOpacityConverter x:Key="BooleanToOpacityConverter"/>
61
    <telerik:Office_BlackTheme x:Key="Theme"/>
62
    <telerik:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
63
    <telerik:GridLineWidthToThicknessConverter x:Key="GridLineWidthToThicknessConverter"/>
64
    <SolidColorBrush x:Key="GridView_HierarchyBackground" Color="#FFBBBBBB"/>
65
    <SolidColorBrush x:Key="GridView_RowIndicatorCellBackground" Color="#FFE4E4E4"/>
66
    <SolidColorBrush x:Key="GridView_NavigatorIndicatorBackground" Color="#FF848484"/>
67
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground1" Color="#7F848484"/>
68
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground2" Color="#FFCBCBCB"/>
69
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground3" Color="#FF848484"/>
70
    <SolidColorBrush x:Key="GridView_EditIndicatorBackground4" Color="White"/>
71
    <LinearGradientBrush x:Key="GridView_ErrorIndicatorBackground1" EndPoint="0.5,1" StartPoint="0.5,0">
72
        <GradientStop Color="#FFFC9999" Offset="0"/>
73
        <GradientStop Color="#FFC26666" Offset="1"/>
74
    </LinearGradientBrush>
75
    <SolidColorBrush x:Key="GridView_ErrorIndicatorBackground2" Color="White"/>
76
    <LinearGradientBrush x:Key="GridView_ErrorIndicatorBackground3" EndPoint="0.5,1" StartPoint="0.5,0">
77
        <GradientStop Color="Red" Offset="0"/>
78
        <GradientStop Color="#FF990000" Offset="1"/>
79
    </LinearGradientBrush>
80
    <ControlTemplate x:Key="GridViewRow_ValidationToolTipTemplate" TargetType="ToolTip">
81
        <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
82
            <Grid.RenderTransform>
83
                <TranslateTransform x:Name="xform" X="-25"/>
84
            </Grid.RenderTransform>
85
            <VisualStateManager.VisualStateGroups>
86
                <VisualStateGroup x:Name="OpenStates">
87
                    <VisualStateGroup.Transitions>
88
                        <VisualTransition GeneratedDuration="0"/>
89
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
90
                            <Storyboard>
91
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
92
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
93
                                </DoubleAnimationUsingKeyFrames>
94
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root">
95
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
96
                                </DoubleAnimationUsingKeyFrames>
97
                            </Storyboard>
98
                        </VisualTransition>
99
                    </VisualStateGroup.Transitions>
100
                    <VisualState x:Name="Closed">
101
                        <Storyboard>
102
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root">
103
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
104
                            </DoubleAnimationUsingKeyFrames>
105
                        </Storyboard>
106
                    </VisualState>
107
                    <VisualState x:Name="Open">
108
                        <Storyboard>
109
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
110
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
111
                            </DoubleAnimationUsingKeyFrames>
112
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root">
113
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
114
                            </DoubleAnimationUsingKeyFrames>
115
                        </Storyboard>
116
                    </VisualState>
117
                </VisualStateGroup>
118
            </VisualStateManager.VisualStateGroups>
119
            <Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
120
            <Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
121
            <Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
122
            <Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
123
            <Border Background="#FFDC000C" CornerRadius="2"/>
124
            <Border CornerRadius="2">
125
                <ItemsControl ItemsSource="{TemplateBinding Content}">
126
                    <ItemsControl.ItemsPanel>
127
                        <ItemsPanelTemplate>
128
                            <StackPanel/>
129
                        </ItemsPanelTemplate>
130
                    </ItemsControl.ItemsPanel>
131
                    <ItemsControl.ItemTemplate>
132
                        <DataTemplate>
133
                            <TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding}"/>
134
                        </DataTemplate>
135
                    </ItemsControl.ItemTemplate>
136
                </ItemsControl>
137
            </Border>
138
        </Grid>
139
    </ControlTemplate>
140
    <LinearGradientBrush x:Key="GridView_RowIndicatorCellBackground_Selected" EndPoint="0.5,1" StartPoint="0.5,0">
141
        <GradientStop Color="White" Offset="0"/>
142
        <GradientStop Color="#FFE4E4E4" Offset="1"/>
143
    </LinearGradientBrush>
144
    <ControlTemplate x:Key="GridViewRowTemplate" TargetType="telerik:GridViewRow">
145
        <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
146
            <VisualStateManager.VisualStateGroups>
147
                <VisualStateGroup x:Name="FocusStates">
148
                    <VisualState x:Name="Unfocused"/>
149
                    <VisualState x:Name="Focused">
150
                        <Storyboard>
151
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="NavigatorIndicator">
152
                                <DiscreteObjectKeyFrame KeyTime="0">
153
                                    <DiscreteObjectKeyFrame.Value>
154
                                        <Visibility>Visible</Visibility>
155
                                    </DiscreteObjectKeyFrame.Value>
156
                                </DiscreteObjectKeyFrame>
157
                            </ObjectAnimationUsingKeyFrames>
158
                        </Storyboard>
159
                    </VisualState>
160
                </VisualStateGroup>
161
                <VisualStateGroup x:Name="SelectionStates">
162
                    <VisualState x:Name="Unselected"/>
163
                    <VisualState x:Name="SelectedUnfocused">
164
                        <Storyboard>
165
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background_Over">
166
                                <DiscreteObjectKeyFrame KeyTime="0">
167
                                    <DiscreteObjectKeyFrame.Value>
168
                                        <Visibility>Visible</Visibility>
169
                                    </DiscreteObjectKeyFrame.Value>
170
                                </DiscreteObjectKeyFrame>
171
                            </ObjectAnimationUsingKeyFrames>
172
                        </Storyboard>
173
                    </VisualState>
174
                </VisualStateGroup>
175
                <VisualStateGroup x:Name="CommonStates">
176
                    <VisualState x:Name="Normal"/>
177
                    <VisualState x:Name="MouseOver">
178
                        <Storyboard>
179
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background_Over">
180
                                <DiscreteObjectKeyFrame KeyTime="0">
181
                                    <DiscreteObjectKeyFrame.Value>
182
                                        <Visibility>Visible</Visibility>
183
                                    </DiscreteObjectKeyFrame.Value>
184
                                </DiscreteObjectKeyFrame>
185
                            </ObjectAnimationUsingKeyFrames>
186
                        </Storyboard>
187
                    </VisualState>
188
                    <VisualState x:Name="Selected">
189
                        <Storyboard>
190
                            <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background_Selected">
191
                                <DiscreteObjectKeyFrame KeyTime="0">
192
                                    <DiscreteObjectKeyFrame.Value>
193
                                        <Visibility>Visible</Visibility>
194
                                    </DiscreteObjectKeyFrame.Value>
195
                                </DiscreteObjectKeyFrame>
196
                            </ObjectAnimationUsingKeyFrames>
197
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="NavigatorIndicatorBackground">
198
                                <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{StaticResource GridView_RowIndicatorCellBackground_Selected}"/>
199
                            </ObjectAnimationUsingKeyFrames>
200
                        </Storyboard>
201
                    </VisualState>
202
                </VisualStateGroup>
203
                <VisualStateGroup x:Name="ValueStates">
204
                    <VisualState x:Name="RowValid"/>
205
                    <VisualState x:Name="RowInvalid">
206
                        <Storyboard>
207
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Background_Invalid">
208
                                <DiscreteObjectKeyFrame KeyTime="0">
209
                                    <DiscreteObjectKeyFrame.Value>
210
                                        <Visibility>Visible</Visibility>
211
                                    </DiscreteObjectKeyFrame.Value>
212
                                </DiscreteObjectKeyFrame>
213
                            </ObjectAnimationUsingKeyFrames>
214
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ErrorIndicator">
215
                                <DiscreteObjectKeyFrame KeyTime="0">
216
                                    <DiscreteObjectKeyFrame.Value>
217
                                        <Visibility>Visible</Visibility>
218
                                    </DiscreteObjectKeyFrame.Value>
219
                                </DiscreteObjectKeyFrame>
220
                            </ObjectAnimationUsingKeyFrames>
221
                        </Storyboard>
222
                    </VisualState>
223
                </VisualStateGroup>
224
                <VisualStateGroup x:Name="EditStates">
225
                    <VisualState x:Name="ReadOnlyMode"/>
226
                    <VisualState x:Name="EditMode">
227
                        <Storyboard>
228
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditIndicator">
229
                                <DiscreteObjectKeyFrame KeyTime="0">
230
                                    <DiscreteObjectKeyFrame.Value>
231
                                        <Visibility>Visible</Visibility>
232
                                    </DiscreteObjectKeyFrame.Value>
233
                                </DiscreteObjectKeyFrame>
234
                            </ObjectAnimationUsingKeyFrames>
235
                        </Storyboard>
236
                    </VisualState>
237
                </VisualStateGroup>
238
            </VisualStateManager.VisualStateGroups>
239
            <telerik:SelectiveScrollingGrid x:Name="grid">
240
                <telerik:SelectiveScrollingGrid.ColumnDefinitions>
241
                    <ColumnDefinition Width="Auto"/>
242
                    <ColumnDefinition Width="Auto"/>
243
                    <ColumnDefinition Width="Auto"/>
244
                    <ColumnDefinition Width="*"/>
245
                </telerik:SelectiveScrollingGrid.ColumnDefinitions>
246
                <telerik:SelectiveScrollingGrid.RowDefinitions>
247
                    <RowDefinition Height="*"/>
248
                    <RowDefinition Height="Auto"/>
249
                    <RowDefinition Height="Auto"/>
250
                    <RowDefinition Height="Auto"/>
251
                </telerik:SelectiveScrollingGrid.RowDefinitions>
252
                <Border x:Name="SelectionBackground" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" Grid.Column="2" HorizontalAlignment="{Binding RenderHorizontalAlignment, RelativeSource={RelativeSource TemplatedParent}}" Margin="{TemplateBinding Margin}" MinWidth="{Binding RenderWidth, RelativeSource={RelativeSource TemplatedParent}}" Padding="{TemplateBinding Padding}" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
253
                <Border x:Name="Background_Over" BorderBrush="{StaticResource ItemOuterBorder_Over}" BorderThickness="1" Grid.ColumnSpan="2" Grid.Column="2" CornerRadius="1" HorizontalAlignment="{Binding RenderHorizontalAlignment, RelativeSource={RelativeSource TemplatedParent}}" Margin="1,1,1,2" MinWidth="{Binding RenderWidth, RelativeSource={RelativeSource TemplatedParent}}" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="Collapsed">
254
                    <Border BorderBrush="{StaticResource ItemInnerBorder_Over}" BorderThickness="1" Background="{StaticResource ItemBackground_Over}"/>
255
                </Border>
256
                <Border x:Name="Background_Selected" BorderBrush="{StaticResource ItemOuterBorder_Selected}" BorderThickness="1" Grid.ColumnSpan="2" Grid.Column="2" CornerRadius="1" HorizontalAlignment="{Binding RenderHorizontalAlignment, RelativeSource={RelativeSource TemplatedParent}}" Margin="1,1,1,2" MinWidth="{Binding RenderWidth, RelativeSource={RelativeSource TemplatedParent}}" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="Collapsed">
257
                    <Border BorderBrush="{StaticResource ItemInnerBorder_Selected}" BorderThickness="1" Background="{StaticResource ItemBackground_Selected}"/>
258
                </Border>
259
                <Border x:Name="Background_Invalid" BorderBrush="{StaticResource ItemOuterBorder_Invalid}" BorderThickness="1" Grid.ColumnSpan="2" Grid.Column="2" CornerRadius="1" HorizontalAlignment="{Binding RenderHorizontalAlignment, RelativeSource={RelativeSource TemplatedParent}}" Margin="1,1,1,2" MinWidth="{Binding RenderWidth, RelativeSource={RelativeSource TemplatedParent}}" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="Collapsed">
260
                    <Border BorderBrush="{StaticResource ItemInnerBorder_Invalid}" BorderThickness="1" Background="{StaticResource ItemBackground_Invalid}"/>
261
                </Border>
262
                <telerik:GridViewToggleButton x:Name="PART_HierarchyExpandButton" Grid.Column="2" IsHitTestVisible="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}}" IsTabStop="{TemplateBinding IsTabStop}" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Opacity="{Binding IsExpandable, Converter={StaticResource BooleanToOpacityConverter}, RelativeSource={RelativeSource TemplatedParent}}" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" telerik:StyleManager.Theme="{StaticResource Theme}" Visibility="{Binding HasHierarchy, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}" Width="25"/>
263
                <Border Grid.Column="2" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HasHierarchy, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}"/>
264
                <telerik:DataCellsPresenter x:Name="PART_DataCellsPresenter" Grid.Column="3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
265
                <Border x:Name="PART_RowBorder" BorderBrush="{StaticResource HorizontalGridLinesBrush}" BorderThickness="{Binding HorizontalGridLinesWidth, ConverterParameter=Bottom, Converter={StaticResource GridLineWidthToThicknessConverter}, RelativeSource={RelativeSource TemplatedParent}}" Grid.ColumnSpan="4" Grid.Column="1" HorizontalAlignment="{Binding RenderHorizontalAlignment, RelativeSource={RelativeSource TemplatedParent}}" MinWidth="{Binding RenderWidth, RelativeSource={RelativeSource TemplatedParent}}" Grid.RowSpan="4" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" VerticalAlignment="Bottom"/>
266
                <Border BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,1" Background="{StaticResource GridView_HierarchyBackground}" Grid.ColumnSpan="2" Grid.Column="2" HorizontalAlignment="{Binding RenderHorizontalAlignment, RelativeSource={RelativeSource TemplatedParent}}" MaxWidth="30000" Padding="6" Grid.Row="2" telerik:SelectiveScrollingGrid.SelectiveScrollingClip="True" Visibility="{Binding IsExpanded, Converter={StaticResource BooleanToVisibilityConverter}, RelativeSource={RelativeSource TemplatedParent}}">
267
                    <ContentPresenter x:Name="PART_HierarchyChildPresenter" telerik:SelectiveScrollingGrid.SelectiveScrollingClip="True"/>
268
                </Border>
269
                <telerik:DetailsPresenter x:Name="PART_DetailsPresenter" Grid.ColumnSpan="2" Grid.Column="2" DetailsProvider="{Binding DetailsProvider}" HorizontalAlignment="{Binding RenderHorizontalAlignment, RelativeSource={RelativeSource TemplatedParent}}" MaxWidth="30000" Grid.Row="1" telerik:SelectiveScrollingGrid.SelectiveScrollingClip="True" telerik:StyleManager.Theme="{StaticResource Theme}" Background="{TemplateBinding Background}" BorderBrush="{x:Null}"/>
270
                <telerik:IndentPresenter x:Name="PART_IndentPresenter" Grid.Column="1"  Grid.RowSpan="4" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" telerik:StyleManager.Theme="{StaticResource Theme}"/>
271
                <Border x:Name="PART_IndicatorPresenter" BorderBrush="{StaticResource ControlOuterBorder}" BorderThickness="0,0,1,1" Grid.Column="0" Grid.RowSpan="3" telerik:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{TemplateBinding RowIndicatorVisibility}" VerticalAlignment="Stretch" Width="25">
272
                    <Border x:Name="NavigatorIndicatorBackground" BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1" Background="{StaticResource GridView_RowIndicatorCellBackground}">
273
                        <Grid>
274
                            <Grid x:Name="NavigatorIndicator" HorizontalAlignment="Center" Height="11" Visibility="Collapsed" VerticalAlignment="Center" Width="11">
275
                                <Path Data="F1 M 32.0234,6.66669L 24.2923,0.0248413L 28.3697,0.0248413L 32,3.14362L 36.1492,6.70819L 32,10.2728L 28.4664,13.3085L 24.2923,13.3085L 32.0234,6.66669 Z " Fill="{StaticResource GridView_NavigatorIndicatorBackground}" HorizontalAlignment="Center" Height="8" Margin="0" Stretch="Fill" VerticalAlignment="Center" Width="8"/>
276
                            </Grid>
277
                            <Grid x:Name="EditIndicator" HorizontalAlignment="Center" Height="10" Visibility="Collapsed" VerticalAlignment="Center" Width="16">
278
                                <Path Data="M14,9 L15,9 15,10 14,10 z M1,9 L2,9 2,10 1,10 z M15,8 L16,8 16,9 15,9 z M0,8 L1,8 1,9 0,9 z M15,1 L16,1 16,2 15,2 z M0,1 L1,1 1,2 0,2 z M14,0 L15,0 15,1 14,1 z M1,0 L2,0 2,1 1,1 z" Fill="{StaticResource GridView_EditIndicatorBackground1}" Stretch="Fill"/>
279
                                <Path Data="M0.99999994,6.9999995 L2,6.9999995 3,6.9999995 4,6.9999995 5,6.9999995 6,6.9999995 7,6.9999995 8,6.9999995 9,6.9999995 10,6.9999995 11,6.9999995 12,6.9999995 13,6.9999995 13,7.9999995 12,7.9999995 11,7.9999995 10,7.9999995 9,7.9999995 8,7.9999995 7,7.9999995 6,7.9999995 5,7.9999995 4,7.9999995 3,7.9999995&#xa;2,7.9999995 0.99999994,7.9999995 z M13,0.99999994 L14,0.99999994 14,1.9999999 14,2.9999995 14,3.9999995 14,4.9999995 14,5.9999995 14,6.9999995 13,6.9999995 13,5.9999995 13,4.9999995 13,3.9999995 13,2.9999995 13,1.9999999 z M0,0.99999994 L0.99999994,0.99999994 0.99999994,1.9999999 0.99999994,2.9999995 0.99999994,3.9999995 0.99999994,4.9999995 0.99999994,5.9999995 0.99999994,6.9999995 0,6.9999995 0,5.9999995 0,4.9999995 0,3.9999995 0,2.9999995 0,1.9999999 z M11,0 L12,0 13,0 13,0.99999994 12,0.99999994 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 4,0.99999994 3,0.99999994 2,0.99999994 0.99999994,0.99999994 0.99999994,2.3841858E-07 2,2.3841858E-07 3,2.3841858E-07 4,2.3841858E-07 5,2.3841858E-07 6,2.3841858E-07 7,2.3841858E-07 8,2.3841858E-07&#xa;9,2.3841858E-07 10,2.3841858E-07 z" Fill="{StaticResource GridView_EditIndicatorBackground2}" Margin="1" Stretch="Fill"/>
280
                                <Path Data="M2,9 L3,9 4,9 5,9 6,9 7,9 8,9 9,9 10,9 11,9 12,9 13,9 14,9 14,10 13,10 12,10 11,10 10,10 9,10 8,10 7,10 6,10 5,10 4,10&#xa;3,10 2,10 z M14,8 L15,8 15,9 14,9 z M1,8 L2,8 2,9 1,9 z M15,2 L16,2 16,3 16,4 16,5 16,6 16,7 16,8 15,8 15,7 15,6 15,5 15,4 15,3 z M3,2 L4,2 5,2 6,2 6,3 5,3 5,4 5,5 5,6 5,7 6,7 6,8 5,8 4,8 3,8 3,7 4,7 4,6 4,5 4,4 4,3 3,3 z M0,2 L1,2 1,3 1,4 1,5 1,6 1,7 1,8 0,8 0,7 0,6 0,5 0,4 0,3 z M14,1 L15,1 15,2 14,2 z M1,1 L2,1 2,2 1,2 z M2,0 L3,0 4,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 13,0 14,0 14,1 13,1 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1&#xa;3,1 2,1 z" Fill="{StaticResource GridView_EditIndicatorBackground3}" Stretch="Fill"/>
281
                                <Path Data="M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 12,2 12,3 12,4 12,5.0000001 12,6 11,6 10,6 9,6 8,6 7,6 6,6 5,6 4,6 4,5.0000001&#xa;3,5.0000001 3,4 3,3 3,2 3,1 4,1 z M0,0 L1,0 1,1 2,1 2,2 2,3 2,4 2,5.0000001 1,5.0000001 1,6 0,6 0,5.0000001 0,4 0,3 0,2 0,1 z" Fill="{StaticResource GridView_EditIndicatorBackground4}" Margin="2" Stretch="Fill"/>
282
                            </Grid>
283
                            <Grid x:Name="ErrorIndicator" HorizontalAlignment="Center" Height="16" Visibility="Collapsed" VerticalAlignment="Center" Width="16">
284
                                <ToolTipService.ToolTip>
285
                                    <ToolTip x:Name="validationTooltip" Content="{Binding Errors}" Placement="Bottom" Template="{StaticResource GridViewRow_ValidationToolTipTemplate}"/>
286
                                </ToolTipService.ToolTip>
287
                                <Path Data="M3,12.999999 L4,12.999999 5,12.999999 6,12.999999 7,12.999999 8,12.999999 9,12.999999 10,12.999999 11,12.999999 11,13.999999 10,13.999999 9,13.999999 8,13.999999 7,13.999999 6,13.999999 5,13.999999 4,13.999999 3,13.999999 z M11,11.999999 L12,11.999999 12,12.999999 11,12.999999 z M2.0000001,11.999999 L3,11.999999 3,12.999999 2.0000001,12.999999 z M12,10.999999 L13,10.999999 13,11.999999 12,11.999999 z M1,10.999999 L2.0000001,10.999999 2.0000001,11.999999 1,11.999999 z M13,2.9999992 L14,2.9999992 14,3.9999992 14,4.9999992 14,5.9999992 14,6.9999992 14,7.9999992 14,8.9999992 14,9.9999992 14,10.999999 13,10.999999 13,9.9999992 13,8.9999992 13,7.9999992 13,6.9999992 13,5.9999992 13,4.9999992 13,3.9999992 z M0,2.9999992 L1,2.9999992 1,3.9999992 1,4.9999992 1,5.9999992 1,6.9999992 1,7.9999992 1,8.9999992 1,9.9999992 1,10.999999 0,10.999999 0,9.9999992 0,8.9999992 0,7.9999992 0,6.9999992 0,5.9999992 0,4.9999992 0,3.9999992 z M12,1.9999999 L13,1.9999999 13,2.9999992 12,2.9999992 z M1,1.9999999 L2.0000001,1.9999999 2.0000001,2.9999992 1,2.9999992 z M11,0.99999994 L12,0.99999994 12,1.9999999 11,1.9999999 z M2.0000001,0.99999994 L2.9999998,0.99999994 2.9999998,1.9999999 2.0000001,1.9999999 z M2.9999998,0 L3.9999998,0 5,0 6,0 7,0 8,0 9,0 10,0 11,0 11,0.99999994 10,0.99999994 9,0.99999994 8,0.99999994 7,0.99999994 6,0.99999994 5,0.99999994 3.9999998,0.99999994 2.9999998,0.99999994 z" Fill="{StaticResource GridView_ErrorIndicatorBackground1}" Margin="1" Stretch="Fill"/>
288
                                <Path Data="M1.4901161E-07,8 L1.0000001,8 2.0000002,8 2.0000002,9 2.0000002,10 1.0000003,10 1.0000003,9 1.0000001,10 1.4901161E-07,10 1.4901161E-07,9 z M1.4901161E-07,0 L1.0000001,0 2.0000002,0 2.0000002,1 2.0000002,2 2.0000002,3 2.0000002,4.0000001 2.0000002,5 2.0000002,5.9999999 2.0000002,7 1.0000001,7 1.4901161E-07,7 1.4901161E-07,5.9999999 1.4901161E-07,5 1.4901161E-07,4.0000001 1.4901161E-07,3 1.4901161E-07,2 0,1 z" Fill="{StaticResource GridView_ErrorIndicatorBackground2}" Margin="7,3" Stretch="Fill"/>
289
                                <Path Data="M4,15 L5,15 6,15 7,15 8,15 9,15 10,15 11,15 12,15 12,16 11,16 10,16 9,16 8,16 7,16 6,16 5,16 4,16 z M12,14 L13,14 13,15 12,15 z M3,14 L4,14 4,15 3,15 z M13,13 L14,13 14,14 13,14 z M2,13 L3,13 3,14 2,14 z M14,12 L15,12 15,13 14,13 z M1,12 L2,12 2,13 1,13 z M7,11 L7,12 7,13 8,13 9,13 9,12 9,11 8,11 z M15,4 L16,4 16,5 16,6 16,7 16,8 16,9 16,10 16,11 16,12 15,12 15,11 15,10 15,9 15,8 15,7 15,6 15,5 z M0,4 L1,4 1,5 1,6 1,7 1,8 1,9 1,10 1,11 1,12 0,12 0,11 0,10 0,9 0,8 0,7 0,6 0,5 z M14,3 L15,3 15,4 14,4 z M7,3 L7,4 7,5 7,6 7,7 7,8 7,9 7,10 8,10 9,10 9,9 9,8 9,7 9,6 9,5 9,4 9,3 8,3 z M1,3 L2,3 2,4 1,4 z M13,2 L14,2 14,3 13,3 z M4,2 L5,2 6,2 7,2 8,2 9,2 10,2 11,2 12,2 12,3 13,3 13,4 14,4 14,5 14,6 14,7 14,8 14,9 14,10 14,11 14,12 13,12 13,13 12,13&#xa;12,14 11,14 10,14 9,14 8,14 7,14 6,14 5,14 4,14 4,13 3,13 3,12 2,12 2,11 2,10 2,9 2,8 2,7 2,6 2,5 2,4 3,4 3,3&#xa;4,3 z M2,2 L3,2 3,3 2,3 z M12,1 L13,1 13,2 12,2 z M3,1 L4,1 4,2 3,2 z M4,0 L5,0 6,0 7,0 8,0 9,0 10,0 11,0 12,0 12,1 11,1 10,1 9,1 8,1 7,1 6,1 5,1 4,1 z" Fill="{StaticResource GridView_ErrorIndicatorBackground3}" Stretch="Fill"/>
290
                            </Grid>
291
                            <Border x:Name="PART_RowResizer" Background="Transparent" Cursor="SizeNS" Height="2" VerticalAlignment="Bottom"/>
292
                        </Grid>
293
                    </Border>
294
                </Border>
295
            </telerik:SelectiveScrollingGrid>
296
        </Border>
297
    </ControlTemplate>
298
    <SolidColorBrush x:Key="ItemBackground" Color="White"/>
299
    <SolidColorBrush x:Key="GridView_GridLinesItemBorder" Color="#FFCBCBCB"/>
300
    <Style x:Key="GridViewRowStyle" TargetType="telerik:GridViewRow">
301
        <Setter Property="IsTabStop" Value="False"/>
302
        <Setter Property="Template" Value="{StaticResource GridViewRowTemplate}"/>
303
        <Setter Property="Background" Value="{StaticResource ItemBackground}"/>
304
        <Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
305
        <Setter Property="BorderThickness" Value="0"/>
306
        <Setter Property="AllowDrop" Value="True"/>
307
        <Setter Property="FontWeight" Value="Normal"/>
308
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
309
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
310
        <Setter Property="Padding" Value="0"/>
311
    </Style>
312
</ResourceDictionary>
KCOM_Backup_2019.09.26_03.36.14/Behaviors/ColumnFilterBehavior.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using System.Linq.Expressions;
7
using System.Reflection;
8
using System.Windows;
9
using System.Windows.Media;
10
using System.Windows.Shapes;
11
using Telerik.Windows.Controls.GridView;
12

  
13
namespace KCOM.Behaviors
14
{ 
15
    public class ColumnFilterBehavior : System.Windows.Interactivity.Behavior<Telerik.Windows.Controls.RadGridView>
16
    {
17
        protected override void OnAttached()
18
        {
19
            AssociatedObject.FilterOperatorsLoading += AssociatedObject_FilterOperatorsLoading;
20
            base.OnAttached();
21
        }
22

  
23
        private void AssociatedObject_FilterOperatorsLoading(object sender, FilterOperatorsLoadingEventArgs e)
24
        {
25
            e.DefaultOperator1 = GetDefaultOperator(AssociatedObject);
26
        }
27

  
28
        protected override void OnDetaching()
29
        {
30
            base.OnDetaching();
31
        }
32

  
33
        public static Telerik.Windows.Data.FilterOperator GetDefaultOperator(DependencyObject obj)
34
        {
35
            return (Telerik.Windows.Data.FilterOperator)obj.GetValue(DefaultOperatorProperty);
36
        }
37
        public static void SetDefaultOperator(DependencyObject obj, Telerik.Windows.Data.FilterOperator value)
38
        {
39
            obj.SetValue(DefaultOperatorProperty, value);
40
        }
41

  
42
        public static readonly DependencyProperty DefaultOperatorProperty = DependencyProperty.RegisterAttached("DefaultOperator", typeof(Telerik.Windows.Data.FilterOperator),
43
                                                                    typeof(ColumnFilterBehavior), new FrameworkPropertyMetadata(Telerik.Windows.Data.FilterOperator.Contains, new PropertyChangedCallback(DefaultOperatorPropertyChanged)));
44

  
45
        private static void DefaultOperatorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
46
        {
47

  
48
        }
49
    }
50
}
KCOM_Backup_2019.09.26_03.36.14/Behaviors/GridViewAutoWidthBehavior.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Linq.Expressions;
5
using System.Reflection;
6
using System.Text;
7
using System.Threading.Tasks;
8
using System.Windows;
9
using System.Windows.Data;
10
using System.Windows.Media;
11
using System.Windows.Shapes;
12
using Telerik.Windows.Controls;
13

  
14
namespace KCOM.Behaviors
15
{
16
    public class GridViewAutoWidthBehavior
17
    {
18
        private readonly RadGridView gridView = null;
19

  
20
        public static bool GetIsEnabled(DependencyObject obj)
21
        {
22
            return (bool)obj.GetValue(IsEnabledProperty);
23
        }
24

  
25
        public static void SetIsEnabled(DependencyObject obj, bool value)
26
        {
27
            obj.SetValue(IsEnabledProperty, value);
28
        }
29

  
30
        // Using a DependencyProperty as the backing store for IsEnabled.  This enables animation, styling, binding, etc...
31
        public static readonly DependencyProperty IsEnabledProperty =
32
            DependencyProperty.RegisterAttached("IsEnabled", typeof(bool), typeof(GridViewAutoWidthBehavior), new PropertyMetadata(false, OnIsEnabledChanged));
33

  
34
        private static void OnIsEnabledChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
35
        {
36
            RadGridView grid = d as RadGridView;
37

  
38
            if (grid != null)
39
            {
40
                var behavior = new GridViewAutoWidthBehavior(grid);
41
            }
42
        }
43

  
44
        public GridViewAutoWidthBehavior(RadGridView grid)
45
        {
46
            this.gridView = grid;
47
            if (this.gridView != null)
48
            {
49
                this.gridView.LoadingRowDetails += new EventHandler<Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs>(OnLoadingRowDetails);
50
            }
51
        }
52

  
53
        void OnLoadingRowDetails(object sender, Telerik.Windows.Controls.GridView.GridViewRowDetailsEventArgs e)
54
        {
55
            var widthProxy = new WidthProxy();
56
            widthProxy.TargetElement = e.DetailsElement;
57
            widthProxy.SetBinding(WidthProxy.WidthProperty, new Binding("ActualWidth") { Source = sender as RadGridView });
58
        }
59

  
60
    }
61
}
KCOM_Backup_2019.09.26_03.36.14/Behaviors/WidthProxy.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using System.Windows;
7

  
8
namespace KCOM.Behaviors
9
{
10
    public class WidthProxy : FrameworkElement
11
    {
12
        public FrameworkElement TargetElement
13
        {
14
            get;
15
            set;
16
        }
17

  
18
        // Using a DependencyProperty as the backing store for TargetElement.
19
        public static readonly DependencyProperty TargetElementProperty =
20
        DependencyProperty.Register("TargetElement", typeof(FrameworkElement), typeof(WidthProxy), new PropertyMetadata(OnWidthChanged));
21

  
22
        public double Width
23
        {
24
            get
25
            {
26
                return (double)this.GetValue(WidthProperty);
27
            }
28
            set
29
            {
30
                this.SetValue(WidthProperty, value);
31
            }
32
        }
33

  
34
        public static readonly DependencyProperty WidthProperty =
35
        DependencyProperty.Register("Width", typeof(double), typeof(WidthProxy), new PropertyMetadata(OnWidthChanged));
36

  
37
        private static void OnWidthChanged(DependencyObject obj, DependencyPropertyChangedEventArgs args)
38
        {
39
            ((WidthProxy)obj).TargetElement.Width = (double)args.NewValue - 50.0;
40
        }
41
    }
42
}
KCOM_Backup_2019.09.26_03.36.14/Behaviors/WindowBehavior.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Linq.Expressions;
5
using System.Reflection;
6
using System.Text;
7
using System.Threading.Tasks;
8
using System.Windows;
9
using System.Windows.Media;
10
using System.Windows.Shapes;
11

  
12
namespace KCOM.Behaviors
13
{
14
    public class WindowBehavior : System.Windows.Interactivity.Behavior<System.Windows.Controls.Control>
15
    {
16
        protected override void OnAttached()
17
        {
18
            AssociatedObject.Loaded += AssociatedObject_Loaded;
19
            base.OnAttached();
20
        }
21

  
22
        protected override void OnDetaching()
23
        {
24
            AssociatedObject.Loaded -= AssociatedObject_Loaded;
25
            base.OnDetaching();
26
        }
27

  
28
        private void AssociatedObject_Loaded(object sender, RoutedEventArgs e)
29
        {
30
            var objectType = AssociatedObject.GetType();
31

  
32
            double objectWidth;
33
            double objectHeight;
... 이 차이점은 표시할 수 있는 최대 줄수를 초과해서 이 차이점은 잘렸습니다.

내보내기 Unified diff

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