aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Intellisense/ClassCompletionItem.cs
blob: a1734ba30bca995a20ef5afda20b29adbaea28f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;

namespace Tango.Scripting.Editors.Intellisense
{
    public class ClassCompletionItem : CompletionItem
    {
        private static BitmapSource image = GetImage("class.png");

        public override BitmapSource Image => image;
        public override string Text => Name;

        public String Name { get; set; }
        public String Namespace { get; set; }
        public override CompletionItemPopupControl PopupControl => new ClassCompletionItemPopup();

        public override void Complete(ScriptEditor editor)
        {
            base.Complete(editor);

            if (Text.Contains("<T>"))
            {
                editor.CaretOffset -= 2;
                editor.Select(editor.CaretOffset, 1);
            }
        }
    }
}
Number.Integer.Long */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: SetHeaterStateRequest.proto
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Tango.PMR.Diagnostics {

  /// <summary>Holder for reflection information generated from SetHeaterStateRequest.proto</summary>
  public static partial class SetHeaterStateRequestReflection {

    #region Descriptor
    /// <summary>File descriptor for SetHeaterStateRequest.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static SetHeaterStateRequestReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChtTZXRIZWF0ZXJTdGF0ZVJlcXVlc3QucHJvdG8SFVRhbmdvLlBNUi5EaWFn",
            "bm9zdGljcxoQSGVhdGVyVHlwZS5wcm90byJyChVTZXRIZWF0ZXJTdGF0ZVJl",
            "cXVlc3QSNQoKSGVhdGVyVHlwZRgBIAEoDjIhLlRhbmdvLlBNUi5EaWFnbm9z",
            "dGljcy5IZWF0ZXJUeXBlEhAKCFNldFBvaW50GAIgASgBEhAKCElzQWN0aXZl",
            "GAMgASgIQiEKH2NvbS50d2luZS50YW5nby5wbXIuZGlhZ25vc3RpY3NiBnBy",
            "b3RvMw=="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Tango.PMR.Diagnostics.HeaterTypeReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Tango.PMR.Diagnostics.SetHeaterStateRequest), global::Tango.PMR.Diagnostics.SetHeaterStateRequest.Parser, new[]{ "HeaterType", "SetPoint", "IsActive" }, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  public sealed partial class SetHeaterStateRequest : pb::IMessage<SetHeaterStateRequest> {
    private static readonly pb::MessageParser<SetHeaterStateRequest> _parser = new pb::MessageParser<SetHeaterStateRequest>(() => new SetHeaterStateRequest());
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pb::MessageParser<SetHeaterStateRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Tango.PMR.Diagnostics.SetHeaterStateRequestReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SetHeaterStateRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SetHeaterStateRequest(SetHeaterStateRequest other) : this() {
      heaterType_ = other.heaterType_;
      setPoint_ = other.setPoint_;
      isActive_ = other.isActive_;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public SetHeaterStateRequest Clone() {
      return new SetHeaterStateRequest(this);
    }

    /// <summary>Field number for the "HeaterType" field.</summary>
    public const int HeaterTypeFieldNumber = 1;
    private global::Tango.PMR.Diagnostics.HeaterType heaterType_ = 0;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public global::Tango.PMR.Diagnostics.HeaterType HeaterType {
      get { return heaterType_; }
      set {
        heaterType_ = value;
      }
    }

    /// <summary>Field number for the "SetPoint" field.</summary>
    public const int SetPointFieldNumber = 2;
    private double setPoint_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public double SetPoint {
      get { return setPoint_; }
      set {
        setPoint_ = value;
      }
    }

    /// <summary>Field number for the "IsActive" field.</summary>
    public const int IsActiveFieldNumber = 3;
    private bool isActive_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool IsActive {
      get { return isActive_; }
      set {
        isActive_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override bool Equals(object other) {
      return Equals(other as SetHeaterStateRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public bool Equals(SetHeaterStateRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (HeaterType != other.HeaterType) return false;
      if (SetPoint != other.SetPoint) return false;
      if (IsActive != other.IsActive) return false;
      return true;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override int GetHashCode() {
      int hash = 1;
      if (HeaterType != 0) hash ^= HeaterType.GetHashCode();
      if (SetPoint != 0D) hash ^= SetPoint.GetHashCode();
      if (IsActive != false) hash ^= IsActive.GetHashCode();
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void WriteTo(pb::CodedOutputStream output) {
      if (HeaterType != 0) {
        output.WriteRawTag(8);
        output.WriteEnum((int) HeaterType);
      }
      if (SetPoint != 0D) {
        output.WriteRawTag(17);
        output.WriteDouble(SetPoint);
      }
      if (IsActive != false) {
        output.WriteRawTag(24);
        output.WriteBool(IsActive);
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public int CalculateSize() {
      int size = 0;
      if (HeaterType != 0) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) HeaterType);
      }
      if (SetPoint != 0D) {
        size += 1 + 8;
      }
      if (IsActive != false) {
        size += 1 + 1;
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(SetHeaterStateRequest other) {
      if (other == null) {
        return;
      }
      if (other.HeaterType != 0) {
        HeaterType = other.HeaterType;
      }
      if (other.SetPoint != 0D) {
        SetPoint = other.SetPoint;
      }
      if (other.IsActive != false) {
        IsActive = other.IsActive;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    public void MergeFrom(pb::CodedInputStream input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            input.SkipLastField();
            break;
          case 8: {
            heaterType_ = (global::Tango.PMR.Diagnostics.HeaterType) input.ReadEnum();
            break;
          }
          case 17: {
            SetPoint = input.ReadDouble();
            break;
          }
          case 24: {
            IsActive = input.ReadBool();
            break;
          }
        }
      }
    }

  }

  #endregion

}

#endregion Designer generated code