static void Main(string[] args) { Student _Student1 = new Student() { Name = "Rahim", Email = "*****@*****.**", RegNo = "R-205" }; string info = _Student1.GetBasicInfo(); Department _Department = new Department(); info = _Department.GetBasicInfo(); Course _Course = new Course(); info = _Course.GetBasicInfo(); IBasicInfo i = _Course; i.GetBasicInfo(); DisplayBasicInfo(_Student1); DisplayBasicInfo(_Course); DisplayBasicInfo(_Department); Console.ReadLine(); }
public static void BumpCounter(IBasicInfo item, DateTime newDate) { var trc = Counters.ContainsKey(item.Id) ? Counters[item.Id] : (Counters[item.Id] = new TriggerCounter()); trc.TriggerCount++; trc.LastTriggerTime = newDate; }
public BasicViewModel(IBasicInfo info) { this.id = info.id; this.first_name = info.first_name; this.middle_name = info.middle_name; this.last_name = info.last_name; this.suffix_id = info.suffix_id; this.birthday = info.birthday; this.gender = info.gender; this.genderDesc = info.genderDesc; this.height_feet = info.height_feet; this.height_inches = info.height_inches; this.weight = info.weight; this.civil_status = info.civil_status; this.civilStatusDesc = info.civilStatusDesc; this.language_known = info.language_known; this.languageDesc = info.languageDesc; this.language_proficiency = info.language_proficiency; this.proficiencyDesc = info.proficiencyDesc; this.nationality = info.nationality; this.nationalityDesc = info.nationalityDesc; this.current_address = info.current_address; this.country = info.country; this.countryDesc = info.countryDesc; this.region = info.region; this.regionDesc = info.regionDesc; this.city_province = info.city_province; this.cityProvinceDesc = info.cityProvinceDesc; this.zip_code = info.zip_code; this.zipCodeDesc = info.zipCodeDesc; this.mobile_number = info.mobile_number; this.mobile_number2 = info.mobile_number2; this.landline_number = info.landline_number; this.skype = info.skype; this.facebook = info.facebook; this.application_source = info.application_source; this.id_type = info.id_type; this.document_number = info.document_number; this.issuance_date = info.issuance_date; this.applicationSourceDesc = info.applicationSourceDesc; }
public static IBasicInfo ShowDialog(IWin32Window owner, IBasicInfo targetItem, Type targetType) { if (targetType.IsAssignableFrom(typeof(ITrigger))) { return(ShowDialog(owner, targetItem, TriggerTypes)); } if (targetType.IsAssignableFrom(typeof(IAction))) { return(ShowDialog(owner, targetItem, ActionTypes)); } throw new ArgumentException("Type is not supported", nameof(targetItem)); }
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { var newType = (comboBox1.SelectedItem as ComboBoxWrapper <Type>)?.WrappedObject; if (newType == null || CurrentItem.GetType() == newType) { return; } //TODO perserve IBasicInfo properties CurrentItem = (IBasicInfo)Activator.CreateInstance(newType); CurrentItem.Enabled = true; }
static void Main(string[] args) { Student aStudent = new Student(); aStudent.GetBasicInfo(); Course aCourse = new Course(); aCourse.GetBasicInfo(); IPrint p = aCourse; IBasicInfo basicInfo = aCourse; p.Print(); // IPrint behaviour basicInfo.GetBasicInfo(); // IBasicInfo Behaviour aCourse.GetBasicInfo(); //Course Behaviour Department aDepartment = new Department(); aDepartment.GetBasicInfo(); }
internal RaidWing(IBasicInfo info, int number) : base(info, $"Wing {number}", $"Flügel {number}") { Number = number; RegisterWing(this); }
public BasicinfoController(IBasicInfo service) { _service = service; }
internal Fractal(IBasicInfo info, int number) : base(info, $"Fractal {number}", $"Fraktal {number}") { Number = number; RegisterFractal(this); }
public static void DisplayBasicInfo(IBasicInfo _IBasicInfo) { Console.WriteLine(_IBasicInfo.GetBasicInfo()); }
internal DragonResponseMission(IBasicInfo info, int number) : base(info, $"DRM {number}", $"DRM {number}") { Number = number; RegisterDragonResponseMission(this); }
public GameArea(IBasicInfo info, string shortName) : this(new ExtendedInfo(info, shortName, shortName)) { }
public ExtendedInfo(IBasicInfo basic, string shortNameEN, string shortNameDE) : this(basic.NameEN, basic.NameDE, shortNameEN, shortNameDE, basic.AvatarURL) { }
internal Strike(IBasicInfo info, int number) : base(info, $"Strike {number}", $"Angriff {number}") { Number = number; RegisterStrike(this); }
public static TriggerCounter GetCounter(IBasicInfo item) { return(Counters.ContainsKey(item.Id) ? Counters[item.Id] : new TriggerCounter()); }