void ReleaseDesignerOutlets()
        {
            if (CheckInButton != null)
            {
                CheckInButton.Dispose();
                CheckInButton = null;
            }

            if (EditConflictsButton != null)
            {
                EditConflictsButton.Dispose();
                EditConflictsButton = null;
            }
        }
Exemplo n.º 2
0
        private void SetContentViewBindings()
        {
            SetContentView(Resource.Layout.Main);

            //commands setting

            CheckInButton.SetCommand(_mainViewModel.Watcher.CheckInCommand);
            CheckOutButton.SetCommand(_mainViewModel.Watcher.CheckOutCommand);
            BreakInButton.SetCommand(_mainViewModel.Watcher.BreakInCommand);
            BreakOutButton.SetCommand(_mainViewModel.Watcher.BreakOutCommand);
            ResetButton.SetCommand(_mainViewModel.Watcher.ResetCommand);

            //labels setting

            Func <DateTime?, string> displayClock = x => (string)(new ClockConverter().Convert(x));

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.StartedAt, () => StartedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.StoppedAt, () => StoppedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.BreakStartedAt, () => BreakStartedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.BreakStoppedAt, () => BreakStoppedAtLabel.Text)
            .ConvertSourceToTarget(displayClock);

            Func <TimeSpan, string> displaySpan = x => (string)(new TimeSpanConverter().Convert(x));

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.CheckInTime, () => CheckInTimeLabel.Text)
            .ConvertSourceToTarget(displaySpan);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.BreaksTotal, () => BreakInTimeLabel.Text)
            .ConvertSourceToTarget(displaySpan);

            this.SetBinding(() => _mainViewModel.Watcher.State.Data.WorkingTime, () => WorkingTimeLabel.Text)
            .ConvertSourceToTarget(displaySpan);
        }
Exemplo n.º 3
0
        void ReleaseDesignerOutlets()
        {
            if (Address1Label != null)
            {
                Address1Label.Dispose();
                Address1Label = null;
            }

            if (Address2Label != null)
            {
                Address2Label.Dispose();
                Address2Label = null;
            }

            if (AdvisorImage != null)
            {
                AdvisorImage.Dispose();
                AdvisorImage = null;
            }

            if (BranchLabel != null)
            {
                BranchLabel.Dispose();
                BranchLabel = null;
            }

            if (CheckInButton != null)
            {
                CheckInButton.Dispose();
                CheckInButton = null;
            }

            if (ConfNumLabel != null)
            {
                ConfNumLabel.Dispose();
                ConfNumLabel = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (EmailLabel != null)
            {
                EmailLabel.Dispose();
                EmailLabel = null;
            }

            if (FullNameLabel != null)
            {
                FullNameLabel.Dispose();
                FullNameLabel = null;
            }

            if (MobileLabel != null)
            {
                MobileLabel.Dispose();
                MobileLabel = null;
            }

            if (PhoneLabel != null)
            {
                PhoneLabel.Dispose();
                PhoneLabel = null;
            }

            if (PurposeLabel != null)
            {
                PurposeLabel.Dispose();
                PurposeLabel = null;
            }

            if (StatusLabel != null)
            {
                StatusLabel.Dispose();
                StatusLabel = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
Exemplo n.º 4
0
 //----< test for CheckIn >---------------------------------
 void testCheckIn()
 {
     CheckIntxtbox.Text = "pkg1.h";
     CheckInButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent, CheckInButton));
 }