コード例 #1
0
        public ShiftElement(Shift shift, double wage)
        {
            InitializeComponent();
            ShiftFromToTextBlock.Text =
                $"{shift.StartTime.Day}.{shift.StartTime.Month}.{shift.StartTime.Year}: " +
                $"{shift.StartTime.Hour}:{shift.StartTime.Minute} - " +
                $"{shift.EndTime.Hour}:{shift.EndTime.Minute}";

            ShiftTimeSpanTextBlock.Text = $"{shift.WorkSpan.Hours}:{shift.WorkSpan.Minutes}:{shift.WorkSpan.Seconds}";

            BreakTimeSpan.Text = $"{shift.BreakSpan.Hours}:{shift.BreakSpan.Minutes}:{shift.BreakSpan.Seconds}";

            WageTextBlock.Text = $"{shift.WorkSpan.Hours*wage + shift.WorkSpan.Minutes*(wage/60)}€";
        }
コード例 #2
0
 public void AddShift(string username, Shift shift)
 {
     UserDictionary[username].AddShift(shift);
 }
コード例 #3
0
 private AddShiftPackage(SerializationInfo info, StreamingContext context)
 {
     shift = info.GetValue("Shift", typeof(Shift)) as Shift;
 }