Пример #1
0
 public RouteFacility(string uid, FacilityType type, string name, int serviceLevel, ExpenseType eType, double expense, FeeType feeType,AirlineFacility requires)
 {
     this.Type = type;
     this.Name = name;
     this.Uid = uid;
     this.ServiceLevel = serviceLevel;
     this.EType = eType;
     this.ExpensePerPassenger = expense;
     this.FeeType = feeType;
     this.Requires = requires;
 }
Пример #2
0
        //returns the value of a specific fee type
        public double getValue(FeeType type)
        {
            lock (this.Fees)
            {
                if (!this.Fees.ContainsKey(type))
                {
                    this.Fees.Add(type, type.DefaultValue);
                }
            }

            return this.Fees[type];
        }
Пример #3
0
 //returns the list of fees of a specific type
 public static List<FeeType> GetTypes(FeeType.eFeeType type)
 {
     return GetTypes().FindAll(delegate(FeeType t) { return t.Type == type; });
 }
Пример #4
0
 //adds a type to the list
 public static void AddType(FeeType type)
 {
     types.Add(type.Name, type);
 }
Пример #5
0
        //creates the slider for a wage type
        private WrapPanel createWageSlider(FeeType type)
        {
            WrapPanel sliderPanel = new WrapPanel();

            TextBlock txtValue = UICreator.CreateTextBlock(new ValueCurrencyConverter().Convert(this.FeeValues[type]).ToString());//UICreator.CreateTextBlock(string.Format("{0:C}", this.FeeValues[type]));
            txtValue.VerticalAlignment = VerticalAlignment.Bottom;
            txtValue.Margin = new Thickness(5, 0, 0, 0);
            txtValue.Tag = type;

            Slider slider = new Slider();
            slider.Width = 200;
            slider.Value = this.FeeValues[type];
            slider.Tag = txtValue;
            slider.Maximum = type.MaxValue;
            slider.Minimum = type.MinValue;
            slider.ValueChanged += new RoutedPropertyChangedEventHandler<double>(slider_ValueChanged);
            slider.TickFrequency = (type.MaxValue - type.MinValue) / slider.Width;
            slider.IsSnapToTickEnabled = true;
            slider.IsMoveToPointEnabled = true;
            sliderPanel.Children.Add(slider);

            sliderPanel.Children.Add(txtValue);

            return sliderPanel;
        }
Пример #6
0
 //adds a type to the list
 public static void AddType(FeeType type)
 {
     types.Add(type.Name, type);
 }
Пример #7
0
 //sets the value of a specific fee type
 public void setValue(FeeType type, double value)
 {
     this.Fees[type] = value;
 }
Пример #8
0
 public RouteFacility(string uid, FacilityType type, string name, int serviceLevel, ExpenseType eType, double expense, FeeType feeType)
     : this(uid,type,name,serviceLevel,eType,expense,feeType,null)
 {
 }
 public AirlineFeeMVVM(FeeType feeType, double value)
 {
     this.FeeType = feeType;
     this.Value = value;
 }
Пример #10
0
        public AirlineFeeMVVM(FeeType feeType, double value)
        {
            this.FeeType = feeType;
            this.Value = value;

            if (this.FeeType.MaxValue - this.FeeType.MinValue < 4)
                this.Frequency = 0.05;
            else
                this.Frequency = 0.25;
        }
Пример #11
0
 //sets the value of a specific fee type
 public void setValue(FeeType type, double value)
 {
     this.Fees[type] = value;
 }