示例#1
0
            /// <summary>
            /// Saves the <see cref="Opc.Da.Server"/> in the configuration data set.
            /// </summary>
            /// <param name="server">The server.</param>
            /// <param name="connectData">The connect data.</param>
            /// <param name="locale">The locale.</param>
            /// <param name="filter">The filter.</param>
            /// <returns></returns>
            public long Save(Opc.Da.Server server, ConnectData connectData, string locale, ResultFilter filter)
            {
                ServersRow rw = this.NewServersRow();

                rw.IsConnected              = server.IsConnected;
                rw.Name                     = server.Name;
                rw.PreferedSpecyficationID  = server.PreferedSpecyfication.ID;
                rw.PreferedSpecyficationDsc = server.PreferedSpecyfication.Description;
                rw.URL = server.Url.ToString();
                if (!string.IsNullOrEmpty(locale))
                {
                    rw.Locale = locale;
                }
                rw.Filter = (int)filter;
                this.AddServersRow(rw);
                if (connectData != null)
                {
                    ((OPCCliConfiguration)this.DataSet).ConnectData.Save(connectData, rw.ID);
                }
                return(rw.ID);
            }
示例#2
0
 public ServersRowChangeEvent(ServersRow row, global::System.Data.DataRowAction action)
 {
     this.eventRow    = row;
     this.eventAction = action;
 }