コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsViewModel" /> class.
        /// </summary>
        /// <param name="runtime">The runtime service.</param>
        public SettingsViewModel(IRuntimeService runtime)
        {
            Runtime     = runtime;
            DisplayName = string.Format("{0:D} - {0}", Protocols.Core);

            ConnectionPicker = new ConnectionPickerViewModel(runtime, ConnectionTypes.Etp)
            {
                AutoConnectEnabled  = true,
                OnConnectionChanged = OnConnectionChanged
            };

            EtpProtocols = new BindableCollection <EtpProtocolItem>
            {
                new EtpProtocolItem(Protocols.ChannelStreaming, "consumer"),
                new EtpProtocolItem(Protocols.ChannelStreaming, "producer", true),
                new EtpProtocolItem(Protocols.ChannelDataFrame, "consumer"),
                new EtpProtocolItem(Protocols.ChannelDataFrame, "producer"),
                new EtpProtocolItem(Protocols.Discovery, "store", true),
                new EtpProtocolItem(Protocols.Store, "store", true),
                new EtpProtocolItem(Protocols.StoreNotification, "store", true),
                new EtpProtocolItem(Protocols.GrowingObject, "store", true),
                new EtpProtocolItem(Protocols.DataArray, "store"),
                new EtpProtocolItem(Protocols.WitsmlSoap, "store", isEnabled: false),
            };
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SettingsViewModel"/> class.
 /// </summary>
 /// <param name="runtime">The runtime.</param>
 public SettingsViewModel(IRuntimeService runtime)
 {
     _log.Debug("Creating view model instance");
     Runtime          = runtime;
     DisplayName      = "Settings";
     WitsmlVersions   = new BindableCollection <string>();
     ConnectionPicker = new ConnectionPickerViewModel(runtime, ConnectionTypes.Witsml)
     {
         OnConnectionChanged = OnConnectionChanged
     };
 }
コード例 #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SettingsViewModel" /> class.
        /// </summary>
        /// <param name="runtime">The runtime service.</param>
        public SettingsViewModel(IRuntimeService runtime)
        {
            Runtime     = runtime;
            DisplayName = "Core";

            ConnectionPicker = new ConnectionPickerViewModel(runtime, ConnectionTypes.Etp)
            {
                AutoConnectEnabled  = true,
                OnConnectionChanged = OnConnectionChanged
            };

            EtpProtocols = new BindableCollection <EtpProtocolItem>();
        }
コード例 #4
0
 public ChannelsViewModel(IRuntimeService runtime)
 {
     Runtime                = runtime;
     DisplayName            = "Channels";
     EtpVersions            = new BindableCollection <string>();
     WitsmlVersions         = new BindableCollection <string>();
     WitsmlConnectionPicker = new ConnectionPickerViewModel(runtime, ConnectionTypes.Witsml)
     {
         OnConnectionChanged = OnWitsmlConnectionChanged
     };
     EtpConnectionPicker = new ConnectionPickerViewModel(runtime, ConnectionTypes.Etp)
     {
         OnConnectionChanged = OnEtpConnectionChanged
     };
     Messages = new TextEditorViewModel(runtime, "JavaScript", true)
     {
         IsScrollingEnabled = true
     };
 }