public double GetWeight()
        {
            ScaleFactory    factory = new ScaleFactory();
            ScaleProperties prop    = new ScaleProperties();

            Scale scale = factory.CreateScale();

            scale.Tare();
            scale.UpdateWeight();
            Decimal Weight = Math.Ceiling(scale.GetWeight());

            return((double)Weight);
        }
 public AirCompModelStub()
 {
     CurrentAmplitude    = 0.5f;
     CurrentExpression   = 0.5f;
     CurrentPitch        = new Pitch(60);
     PlayingPitch        = new Pitch(50);
     CurrentPitchBend    = 0f;
     CurrentScale        = ScaleFactory.CreateScale(Tone.C, Scales.Chromatic);
     AvailableOutDevices = new List <string> {
         "My MIDI out device"
     };
     CurrentOutDevice     = AvailableOutDevices.First();
     AvailableOutChannels = new List <int> {
         1, 2, 3, 4
     };
     CurrentOutChannel = AvailableOutChannels.First();
 }
示例#3
0
 /// <summary>
 /// Changes the current scale.
 /// </summary>
 /// <param name="baseTone">The base tone.</param>
 /// <param name="scaleName">Name of the scale.</param>
 public void ChangeScale(Tone baseTone, Scales scaleName)
 {
     CurrentScale = ScaleFactory.CreateScale(baseTone, scaleName);
 }