Пример #1
0
 protected void RaiseError(EventArgsString e)
 {
     if (OnError != null)
         OnError(this, e);
 }
Пример #2
0
 protected virtual void OnAircraftChange(EventArgsString e)
 {
     if (AircraftChange != null)
         AircraftChange(this, e);
 }
Пример #3
0
        void wtCurrentAircraft_AircraftChange(object sender, EventArgsString e)
        {

            try
            {
                if (!checkBoxBindAircraft.Checked)
                {
                    Utils.SetProperty<Label, String>(labelCurrentAircraft, "Text", e.Value);
                }
                Debug.Print("WT aircraft changed {0}", currentAircraft.AircraftName);

                var bindedProfile = _profileManager.Profiles.FirstOrDefault(p => p.BindVehicle == currentAircraft.AircraftName && p.BindGame == currentAircraft.GameName);
                if (bindedProfile != null && bindedProfile.Title != _currentProfile.Title)
                {
                    Debug.Print("Set profile on aircraft change {0} aircraft: {1}", bindedProfile.Title, currentAircraft.AircraftName);
                    Utils.CallMethod<Form>(this, "SetCurrentProfile", bindedProfile.Title);
                }
            }
            catch (Exception ex)
            {
                Debug.Print("WT Aircraft change exception {0} {1}", ex.Message, ex.StackTrace);
            }



        }
Пример #4
0
 void wtFolders_OnError(object sender, EventArgsString e)
 {
     RaiseError(new EventArgsString() { Name = e.Name, Value = e.Value });
 }
Пример #5
0
 void currentAircraft_OnError(object sender, EventArgsString e)
 {
     try
     {
         Utils.SetProperty<Label, String>(labelCurrentAircraft, "Text", e.Value);
         errorToolTip.SetToolTip(labelCurrentAircraft, e.Value);
     }
     catch {
         Debug.Print("Current aircraft raised an exception");
     }
 }