Пример #1
0
        private void cmbStatus_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            MessageBoxResult confirm = MessageBox.Show("Do you really want to change Status filter?\r\nAll unsaved jobs will be reset.", "", MessageBoxButton.OKCancel);

            if (confirm == MessageBoxResult.OK)
            {
                EstimateStatus selectedEstimateStatus = (EstimateStatus)cmbStatus.SelectedItem;

                _currentApp.SelectedStatusId = selectedEstimateStatus.StatusId;

                ResetEditEstimateUserID();

                if (MainFrame.Source != null && MainFrame.Source.OriginalString == "/EstimateList.xaml")
                {
                    MainFrame.Refresh();
                }
                else
                {
                    MainFrame.Navigate(new Uri("/EstimateList.xaml", UriKind.Relative));
                }
            }
            else
            {   //Change Status to what it was
                //Remove SelectionChanged EventHandler before modifying value
                cmbStatus.SelectionChanged -= new Telerik.Windows.Controls.SelectionChangedEventHandler(cmbStatus_SelectionChanged);
                //Modify value
                cmbStatus.SelectedValue = _currentApp.SelectedStatusId;
                //Add SelectionChanged EventHandler
                cmbStatus.SelectionChanged += new Telerik.Windows.Controls.SelectionChangedEventHandler(cmbStatus_SelectionChanged);
            }
        }
Пример #2
0
        private void cmbUserRole_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            MessageBoxResult confirm = MessageBox.Show("Do you really want to change your role?\r\nAll unsaved jobs will be reset.", "", MessageBoxButton.OKCancel);

            if (confirm == MessageBoxResult.OK)
            {
                UserRole selectedRole = (UserRole)cmbUserRole.SelectedItem;

                _currentApp.CurrentUserRoleId = selectedRole.RoleId;
                _currentApp.IsManager         = selectedRole.IsManager;

                ResetEditEstimateUserID();

                RetailSystemClient mrsClient = new RetailSystemClient();
                mrsClient.Endpoint.Address = new System.ServiceModel.EndpointAddress(Internal.Utilities.GetMetriconRetailSystemWcfClientEndpointUrl());

                mrsClient.GetRevisionTypeAccessCompleted += new EventHandler <GetRevisionTypeAccessCompletedEventArgs>(mrsClient_GetRevisionTypeAccessCompleted);
                mrsClient.GetRevisionTypeAccessAsync(selectedRole.RoleId);

                mrsClient.GetRoleAccessModuleCompleted += new EventHandler <GetRoleAccessModuleCompletedEventArgs>(mrsClient_GetRoleAccessModuleCompleted);
                mrsClient.GetRoleAccessModuleAsync(_currentApp.CurrentUserRoleId);
            }
            else
            {
                //Remove SelectionChanged EventHandler before modifying value
                cmbUserRole.SelectionChanged -= new Telerik.Windows.Controls.SelectionChangedEventHandler(cmbUserRole_SelectionChanged);
                //Modify value
                cmbUserRole.SelectedValue = _currentApp.CurrentUserRoleId;
                //Add SelectionChanged EventHandler
                cmbUserRole.SelectionChanged += new Telerik.Windows.Controls.SelectionChangedEventHandler(cmbUserRole_SelectionChanged);
            }
        }
Пример #3
0
 /// <summary>
 /// cbUser SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void cbUser_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     SelectedUser = (String)this.cbUser.SelectedValue;
     if (SelectedUser != null && SelectedAttendanceType != null)
     {
         this.OKButton.IsEnabled = true;
     }
 }
Пример #4
0
 private void SecurityBlockSelection_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (e.AddedItems.Count == 1)
     {
         NoAssociationWarning.Visibility   = Visibility.Collapsed;
         SecurityManagementBox.Visibility  = Visibility.Visible;
         SecurityManagementBox.ItemsSource = (PermissionGroupCollection)e.AddedItems[0];
     }
 }
 /// <summary>
 /// dpPresentationDate SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void dpPresentationDate_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (this.dpPresentationDate.SelectedDate == null)
     {
         return;
     }
     SelectedPresentationDateTime = Convert.ToDateTime(this.dpPresentationDate.SelectedDate);
     this.OKButton.IsEnabled      = true;
 }
Пример #6
0
 private void TaskListRadTreeViewPreviewSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems != null && e.AddedItems.Count > 0 && e.AddedItems[0] != null)
     {
         if (e.AddedItems[0] is SystemPermissionDto)
         {
             e.Handled = true;
         }
     }
 }
 private void TaskListRadTreeViewPreviewSelectionChanged( object sender, SelectionChangedEventArgs e )
 {
     if ( e.AddedItems != null && e.AddedItems.Count > 0 && e.AddedItems[0] != null )
     {
         if ( e.AddedItems[0] is SystemPermissionDto )
         {
             e.Handled = true;
         }
     }
 }
Пример #8
0
        /// <summary>
        /// Method to be called when the selection is changed in Frequency Comco box
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmbFrequencyInterval_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            switch (cmbFrequencyInterval.SelectedValue.ToString())
            {
            case ("Daily"):
            {
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "d";
                this.chUnrealizedGainLoss.DefaultView.ChartArea.SmartLabelsEnabled       = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.AutoRange          = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.Step      = 5;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.LabelStep = 2;
                break;
            }

            case ("Weekly"):
            {
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "d";
                this.chUnrealizedGainLoss.DefaultView.ChartArea.SmartLabelsEnabled       = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.AutoRange          = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.Step      = 7;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.LabelStep = 2;

                break;
            }

            case ("Monthly"):
            {
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "m";
                this.chUnrealizedGainLoss.DefaultView.ChartArea.SmartLabelsEnabled       = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.AutoRange          = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.Step      = 1;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.LabelStep = 2;
                break;
            }

            case ("Yearly"):
            {
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "Y";
                this.chUnrealizedGainLoss.DefaultView.ChartArea.SmartLabelsEnabled       = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.AutoRange          = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.Step      = 1;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.LabelStep = 2;
                break;
            }

            default:
            {
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "d";
                this.chUnrealizedGainLoss.DefaultView.ChartArea.SmartLabelsEnabled       = true;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.Step      = 1;
                this.chUnrealizedGainLoss.DefaultView.ChartArea.AxisX.LabelStep = 2;
                break;
            }
            }
        }
Пример #9
0
        /// <summary>
        /// cbAlert SelectionChanged EventHandler
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">SelectionChangedEventArgs</param>
        private void cbAlert_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            List <String> userArray = new List <String>();

            UserAlertEmails = new List <String>();
            foreach (MembershipUserInfo item in this.cbAlert.SelectedItems)
            {
                userArray.Add(item.UserName);
                UserAlertEmails.Add(item.Email);
            }
            this.txtAlertUsers.Text = String.Join(", ", userArray.ToArray());
        }
        public void FormControlAddress_StateSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            Telerik.Windows.Controls.RadComboBox stateComboBox = (Telerik.Windows.Controls.RadComboBox)sender;

            if (stateComboBox == null)
            {
                return;
            }

            if (stateComboBox.SelectedValue == null)
            {
                return;
            }

            Client.Core.Forms.Controls.Address addressControl = (Client.Core.Forms.Controls.Address)stateComboBox.Tag;

            if (addressControl == null)
            {
                return;
            }


            Boolean valueChanged = (stateComboBox.SelectedValue.ToString() != addressControl.State);

            valueChanged = ((valueChanged) && (addressControl.EnabledAndNotReadOnly));


            if (valueChanged)
            {
                addressControl.State = stateComboBox.SelectedValue.ToString();

                addressControl.AddressId = 0;

                stateComboBox.SetBinding(Telerik.Windows.Controls.RadComboBox.SelectedValueProperty, renderEngine.PropertyDataBinding("State", addressControl, System.Windows.Data.BindingMode.OneWay));

                if ((addressControl.HasEventHandler("AddressChanged")) || (addressControl.HasDependencyDataBinding))
                {
                    FormServerProcessing_ControlPanelDisable(addressControl, Mercury.Client.Core.Forms.ServerProcessRequestType.ValueChanged);

                    form.ValueChanged(addressControl, FormServerProcessCompleted);
                }
            }

            // MAKE SURE TO UPDATE CITY REFERENCE (INDEPENDENT OF CHANGE)

            // THIS COULD BE FROM A POSTBACK/SERVER-UPDATE THAT NEEDS TO RESET THE STATE TO MAINTAIN THE CITY INFORMATION

            MercuryApplication.CityReferenceByState(addressControl.State, true, FormControlAddress_CityReferenceByStateCompleted);

            return;
        }
Пример #11
0
 private void conditionType_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     if (conditionType != null)
     {
         if (conditionType.Text == "时间")
         {
             datePanel.Visibility = Visibility.Visible;
             tb.Visibility        = Visibility.Collapsed;
         }
         else
         {
             datePanel.Visibility = Visibility.Collapsed;
             tb.Visibility        = Visibility.Visible;
         }
     }
 }
Пример #12
0
 private void TaskGroupListRadTreeViewPreviewSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (e.AddedItems != null && e.AddedItems.Count > 0 && e.AddedItems[0] != null)
     {
         if (e.AddedItems[0] is SystemRoleDto)
         {
             if ((e.AddedItems[0] as SystemRoleDto).SystemRoleType == SystemRoleType.Task)
             {
                 e.Handled = true;
             }
         }
         else if (e.AddedItems[0] is SystemPermissionDto)
         {
             e.Handled = true;
         }
     }
 }
 private void TaskGroupListRadTreeViewPreviewSelectionChanged( object sender, SelectionChangedEventArgs e )
 {
     if ( e.AddedItems != null && e.AddedItems.Count > 0 && e.AddedItems[0] != null )
     {
         if ( e.AddedItems[0] is SystemRoleDto )
         {
             if ( ( e.AddedItems[0] as SystemRoleDto ).SystemRoleType == SystemRoleType.Task )
             {
                 e.Handled = true;
             }
         }
         else if ( e.AddedItems[0] is SystemPermissionDto )
         {
             e.Handled = true;
         }
     }
 }
        public void FormControlAddress_CitySelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            Telerik.Windows.Controls.RadComboBox cityComboBox = (Telerik.Windows.Controls.RadComboBox)sender;

            if (cityComboBox == null)
            {
                return;
            }

            if (cityComboBox.SelectedValue == null)
            {
                return;
            }

            Client.Core.Forms.Controls.Address addressControl = (Client.Core.Forms.Controls.Address)cityComboBox.Tag;

            if (addressControl == null)
            {
                return;
            }


            Boolean valueChanged = (cityComboBox.SelectedValue.ToString() != addressControl.City);

            valueChanged = ((valueChanged) && (addressControl.EnabledAndNotReadOnly));


            if (valueChanged)
            {
                addressControl.City = cityComboBox.SelectedValue.ToString();

                addressControl.AddressId = 0;

                cityComboBox.SetBinding(Telerik.Windows.Controls.RadComboBox.SelectedValueProperty, renderEngine.PropertyDataBinding("City", addressControl, System.Windows.Data.BindingMode.OneWay));

                if ((addressControl.HasEventHandler("AddressChanged")) || (addressControl.HasDependencyDataBinding))
                {
                    FormServerProcessing_ControlPanelDisable(addressControl, Mercury.Client.Core.Forms.ServerProcessRequestType.ValueChanged);

                    form.ValueChanged(addressControl, FormServerProcessCompleted);
                }
            }

            return;
        }
Пример #15
0
        private void LayerSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            if (e.RemovedItems != null)
            {
                foreach (MapItem item in e.RemovedItems)
                {
                    item.IsSelected = false;
                }
            }

            if (e.AddedItems != null)
            {
                foreach (MapItem item in e.AddedItems)
                {
                    item.IsSelected = true;
                }
            }
        }
Пример #16
0
        private void cmbUserRole_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            if (!BusyIndicator2.IsBusy)
                BusyIndicator2.IsBusy = true;

            UserRole selectedRole = (UserRole)cmbUserRole.SelectedItem;

            _currentApp.CurrentUserRoleId = selectedRole.RoleId;
            _currentApp.IsManager = selectedRole.IsManager;

            //Get Alert Message
            RetailSystemClient mrsClient = new RetailSystemClient();
            mrsClient.Endpoint.Address = new System.ServiceModel.EndpointAddress(Utilities.GetMetriconRetailSystemWcfClientEndpointUrl());

            mrsClient.GetEstimateCountCompleted += new EventHandler<GetEstimateCountCompletedEventArgs>(mrsClient_GetEstimateCountCompleted);
            mrsClient.GetEstimateCountAsync(_currentApp.CurrentUserId, _currentApp.CurrentUserRoleId);

            mrsClient.GetRoleAccessModuleCompleted += new EventHandler<GetRoleAccessModuleCompletedEventArgs>(mrsClient_GetRoleAccessModuleCompleted);
            mrsClient.GetRoleAccessModuleAsync(_currentApp.CurrentUserRoleId);
        }
        public void FormControlService_ServiceDateChanged(Object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            Telerik.Windows.Controls.RadDatePicker serviceDatePicker = (Telerik.Windows.Controls.RadDatePicker)sender;

            Boolean dateChanged = false;

            if ((serviceDatePicker.Tag is Client.Core.Forms.Controls.Service) && (serviceDatePicker.Tag != null))
            {
                Client.Core.Forms.Controls.Service serviceControl = (Client.Core.Forms.Controls.Service)serviceDatePicker.Tag;

                if ((serviceControl.ServiceDate.HasValue) && (serviceDatePicker.SelectedDate.HasValue))
                {
                    dateChanged = (serviceControl.ServiceDate.Value != serviceDatePicker.SelectedDate.Value);
                }

                else
                {
                    dateChanged = true;
                }


                if (dateChanged)
                {
                    serviceControl.ServiceDate = serviceDatePicker.SelectedDate;

                    if (serviceControl.HasEventHandler("ServiceDateChanged"))
                    {
                        FormServerProcessing_ControlPanelDisable(serviceControl, Mercury.Client.Core.Forms.ServerProcessRequestType.RaiseEvent);

                        form.RaiseEvent(serviceControl, "ServiceDateChanged", FormServerProcessCompleted);
                    }
                }
            }

            return;
        }
Пример #18
0
 private void OnTimePickerSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 #endif
 {
     this.HandlePickersSelectionChanged();
 }
 /// <summary>
 /// cbVoteType SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void cbVoteType_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     DataContextViewModelPresentationVote.RaiseUpdateVoteType(this.cbVoteType.SelectedValue as String);
 }
Пример #20
0
 private void cboxStation_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     LoadOfficers();
 }
Пример #21
0
        private void WorkQueueSelection_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            InitializeMyWorkQueuesForSelection();

            return;
        }
Пример #22
0
 private void RadOutlookBar1_PreviewSelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     //use the Handled property to prevent the selection
 }
 /// <summary>
 /// cmbEntitySelection SelectionChanged Event Handler
 /// </summary>
 /// <param name="sender">Sender</param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void cmbEntitySelection_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     this.btnOK.IsEnabled = this.txtGroupName.Text.Count() > 0 && this.cmbEntitySelection.SelectedItem != null;
 }
Пример #24
0
 protected internal virtual void OnSelectionChanged(Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     this.RaiseEvent(e);
 }
Пример #25
0
 private void RadListBox_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
 }
Пример #26
0
 private void Calendar_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     this.HandlePickersSelectionChanged();
 }
 /// <summary>
 /// cbVoteType SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void FVMeasure_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     RaiseICPresentationOverviewInfoChanged();
 }
 private void LanguagesComboBox_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     MessageBox.Show($"You have selected {this.SelectedLanguage.DisplayName}");
 }
        private void RadComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (DescriptionTypeSelector.SelectedIndex)
            {
            case 0:
                //Selected Text (Rich Text or Raw HTML)

                //check if the previous selection was Embed Web Page and if the URL had been specified
                if (_previousSelection == 1 && !string.IsNullOrWhiteSpace(NodeProperties.DescriptionUrl))
                {
                    SuperMessageBoxService.ShowWarning("Change Description Type",
                                                       "The embedded web page will be removed and replaced with text.\r\n" +
                                                       "Are you sure you want to continue?",
                                                       "Yes", "No",
                                                       () =>
                    {
                        DescriptionNotice.Visibility     = Visibility.Collapsed;
                        CbRichTextAdvanceMode.Visibility = Visibility.Visible;
                        IframePanel.Visibility           = Visibility.Collapsed;
                        WidthHeightPanels.Visibility     = Visibility.Visible;

                        //Clear the IFrame Details.
                        NodeProperties.DescriptionUrl = "";

                        if (CbRichTextAdvanceMode.IsChecked == true)
                        {
                            RawPanel.Visibility      = Visibility.Visible;
                            DesignerPanel.Visibility = Visibility.Collapsed;
                            DescriptionType          = NodeDescriptionType.RawInput;
                        }
                        else
                        {
                            RawPanel.Visibility      = Visibility.Collapsed;
                            DesignerPanel.Visibility = Visibility.Visible;
                            DescriptionType          = NodeDescriptionType.Html;
                        }
                    },
                                                       () =>
                    {
                        _previousSelection = -1;         //this will prevent a double warning message
                        DescriptionTypeSelector.SelectedIndex = 1;
                    });
                }
                else
                {
                    DescriptionNotice.Visibility     = Visibility.Collapsed;
                    CbRichTextAdvanceMode.Visibility = Visibility.Visible;
                    IframePanel.Visibility           = Visibility.Collapsed;
                    WidthHeightPanels.Visibility     = Visibility.Visible;
                    if (CbRichTextAdvanceMode.IsChecked == true)
                    {
                        RawPanel.Visibility      = Visibility.Visible;
                        DesignerPanel.Visibility = Visibility.Collapsed;
                        DescriptionType          = NodeDescriptionType.RawInput;
                    }
                    else
                    {
                        RawPanel.Visibility      = Visibility.Collapsed;
                        DesignerPanel.Visibility = Visibility.Visible;
                        DescriptionType          = NodeDescriptionType.Html;
                    }
                }
                break;

            case 1:
                //Selected Embed Web Page

                //check if previous selection was Text and if there was any content entered
                if (_previousSelection == 0 && ((DescriptionType == NodeDescriptionType.Html && !string.IsNullOrWhiteSpace(RichTextEditor.GetRawText())) ||
                                                (DescriptionType == NodeDescriptionType.RawInput && !string.IsNullOrWhiteSpace(HtmlEditor.Text))))
                {
                    SuperMessageBoxService.ShowWarning("Change Description Type",
                                                       "The text will be removed and replaced with embedded web page.\r\n" +
                                                       "Are you sure you want to continue?",
                                                       "Yes", "No",
                                                       () =>
                    {
                        DescriptionNotice.Visibility = Visibility.Collapsed;
                        IframePanel.Visibility       = Visibility.Visible;
                        RawPanel.Visibility          = Visibility.Collapsed;
                        DesignerPanel.Visibility     = Visibility.Collapsed;
                        DescriptionType = NodeDescriptionType.Iframe;
                        CbRichTextAdvanceMode.Visibility = Visibility.Collapsed;
                        WidthHeightPanels.Visibility     = Visibility.Visible;

                        //Clear the HTML editors
                        RichTextEditor.LoadHtml("");
                        HtmlEditor.Text = "";
                    },
                                                       () =>
                    {
                        _previousSelection = -1;         //this will prevent a double warning message
                        DescriptionTypeSelector.SelectedIndex = 0;
                    });
                }
                else
                {
                    DescriptionNotice.Visibility = Visibility.Collapsed;
                    IframePanel.Visibility       = Visibility.Visible;
                    RawPanel.Visibility          = Visibility.Collapsed;
                    DesignerPanel.Visibility     = Visibility.Collapsed;
                    DescriptionType = NodeDescriptionType.Iframe;
                    CbRichTextAdvanceMode.Visibility = Visibility.Collapsed;
                    WidthHeightPanels.Visibility     = Visibility.Visible;
                }
                break;

            case -1:
                DescriptionNotice.Visibility = Visibility.Visible;
                IframePanel.Visibility       = Visibility.Collapsed;
                WidthHeightPanels.Visibility = Visibility.Collapsed;
                RawPanel.Visibility          = Visibility.Collapsed;
                DesignerPanel.Visibility     = Visibility.Collapsed;
                DescriptionType = NodeDescriptionType.None;
                CbRichTextAdvanceMode.Visibility = Visibility.Collapsed;
                break;
            }
            _previousSelection = DescriptionTypeSelector.SelectedIndex;
        }
Пример #30
0
 /// <summary>
 /// cbCompany SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void cbCompany_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     UploadFileCompanyInfo = this.cbCompany.SelectedItem as String;
     ValidateSubmission();
 }
 private void PermissionListRadTreeViewPreviewSelectionChanged( object sender, SelectionChangedEventArgs e )
 {
     e.Handled = true;
 }
Пример #32
0
 /// <summary>
 /// cbType SelectionChanged EventHandler
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">SelectionChangedEventArgs</param>
 private void cbType_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
 {
     UploadFileType = (DocumentCategoryType)this.cbType.SelectedItem;
     ValidateSubmission();
 }
Пример #33
0
        void tkCalendar_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangedEventArgs e)
        {
            /* Selected Date to curDate control */
            string curDay;

            curDay = tkCalendar.SelectedDate.Value.Day.ToString();// tkCalendar.SelectedDate.ToString().Substring(tkCalendar.SelectedDate.ToString().LastIndexOf("-") + 1, tkCalendar.SelectedDate.ToString().IndexOf("-") - 2);
            curDate.strTXT.Text = tkCalendar.SelectedDate.ToString().Substring(0, tkCalendar.SelectedDate.ToString().LastIndexOf("-")) + " *" + tkCalendar.SelectedDate.Value.DayOfWeek.ToString();
            if (curDay.Length < 2)
            {
                curDay = "0" + curDay;
            }
            curDate.uperT.Text = curDate.calT.Text = curDate.downT.Text = curDay;


            /* Judge public holiday. */
            if (tkCalendar.SelectedDate.Value.DayOfWeek.ToString() == "Saturday" || tkCalendar.SelectedDate.Value.DayOfWeek.ToString() == "Sunday" || DateTime.Now.DayOfWeek.ToString() == specDay.ToString())
            {
                //this.tkCalendar.SelectedDate.
                //tkCalendar.SelectedDate.Value
                phDay = true;
            }
            else
            {
                phDay = false;
            }

            /* Detail panel */
            if (Detailer.step % 2 == 1)
            {
                Detailer.step = 0;
            }
            else
            {
                Detailer.step = 1;
            }
            Detailer.detail_loader.Begin();
            Detailer.ph.Text = "Public Holiday : " + phDay.ToString();

            /* Set PH Desc to Detailer */
            for (int i = 0; i < pwcPHDate.Length; i++)
            {
                if (tkCalendar.SelectedDate.Value.Date == Convert.ToDateTime(pwcPHDate.GetValue(i)))
                {
                    Detailer.counDesc.Text = pwcPHDesc.GetValue(i).ToString();
                    break;
                }
                else
                {
                    Detailer.counDesc.Text = "Work Day...";
                }
            }

            //for (int i = 0; i < arryDesc.Length; i++)
            //{
            //    Detailer.counDesc.Text = arryDesc.GetValue(i).ToString();
            //}


            //testTxt.Text = e.Handled.ToString();
            //tkCalendar.SelectedDates.Add(DateTime.Today);
            //testTxt.Text = phDay.ToString() + "@";// +this.tkCalendar.SelectedDate.Value.DayOfWeek.ToString() + "*" + DateTime.Now.DayOfWeek.ToString() + " " + curDay + ";" + tkCalendar.SelectedDate.ToString() + "," + tkCalendar.SelectedDate.ToString();
            //throw new NotImplementedException();
        }
        private void RadComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (DescriptionTypeSelector.SelectedIndex)
            {
                case 0:
                    //Selected Text (Rich Text or Raw HTML)

                    //check if the previous selection was Embed Web Page and if the URL had been specified
                    if (_previousSelection == 1 && !string.IsNullOrWhiteSpace(NodeProperties.DescriptionUrl))
                    {
                        SuperMessageBoxService.ShowWarning("Change Description Type", 
                            "The embedded web page will be removed and replaced with text.\r\n" +
                            "Are you sure you want to continue?",
                            "Yes", "No",
                            () =>
                            {
                                DescriptionNotice.Visibility = Visibility.Collapsed;
                                CbRichTextAdvanceMode.Visibility = Visibility.Visible;
                                IframePanel.Visibility = Visibility.Collapsed;
                                WidthHeightPanels.Visibility = Visibility.Visible;

                                //Clear the IFrame Details.
                                NodeProperties.DescriptionUrl = "";

                                if (CbRichTextAdvanceMode.IsChecked == true)
                                {
                                    RawPanel.Visibility = Visibility.Visible;
                                    DesignerPanel.Visibility = Visibility.Collapsed;
                                    DescriptionType = NodeDescriptionType.RawInput;
                                }
                                else
                                {
                                    RawPanel.Visibility = Visibility.Collapsed;
                                    DesignerPanel.Visibility = Visibility.Visible;
                                    DescriptionType = NodeDescriptionType.Html;
                                }
                            },
                            () =>
                            {
                                _previousSelection = -1; //this will prevent a double warning message
                                DescriptionTypeSelector.SelectedIndex = 1;
                            });
                    }
                    else
                    {
                        DescriptionNotice.Visibility = Visibility.Collapsed;
                        CbRichTextAdvanceMode.Visibility = Visibility.Visible;
                        IframePanel.Visibility = Visibility.Collapsed;
                        WidthHeightPanels.Visibility = Visibility.Visible;
                        if (CbRichTextAdvanceMode.IsChecked == true)
                        {
                            RawPanel.Visibility = Visibility.Visible;
                            DesignerPanel.Visibility = Visibility.Collapsed;
                            DescriptionType = NodeDescriptionType.RawInput;
                        }
                        else
                        {
                            RawPanel.Visibility = Visibility.Collapsed;
                            DesignerPanel.Visibility = Visibility.Visible;
                            DescriptionType = NodeDescriptionType.Html;
                        }
                    }
                    break;
                case 1:
                    //Selected Embed Web Page

                    //check if previous selection was Text and if there was any content entered
                    if (_previousSelection == 0 && ((DescriptionType == NodeDescriptionType.Html && !string.IsNullOrWhiteSpace(RichTextEditor.GetRawText())) ||
                        (DescriptionType == NodeDescriptionType.RawInput && !string.IsNullOrWhiteSpace(HtmlEditor.Text))))
                    {
                        SuperMessageBoxService.ShowWarning("Change Description Type",
                            "The text will be removed and replaced with embedded web page.\r\n" +
                            "Are you sure you want to continue?",
                            "Yes", "No",
                            () =>
                            {
                                DescriptionNotice.Visibility = Visibility.Collapsed;
                                IframePanel.Visibility = Visibility.Visible;
                                RawPanel.Visibility = Visibility.Collapsed;
                                DesignerPanel.Visibility = Visibility.Collapsed;
                                DescriptionType = NodeDescriptionType.Iframe;
                                CbRichTextAdvanceMode.Visibility = Visibility.Collapsed;
                                WidthHeightPanels.Visibility = Visibility.Visible;

                                //Clear the HTML editors
                                RichTextEditor.LoadHtml("");
                                HtmlEditor.Text = "";
                            },
                            () =>
                            {
                                _previousSelection = -1; //this will prevent a double warning message
                                DescriptionTypeSelector.SelectedIndex = 0;
                            });
                    }
                    else
                    {
                        DescriptionNotice.Visibility = Visibility.Collapsed;
                        IframePanel.Visibility = Visibility.Visible;
                        RawPanel.Visibility = Visibility.Collapsed;
                        DesignerPanel.Visibility = Visibility.Collapsed;
                        DescriptionType = NodeDescriptionType.Iframe;
                        CbRichTextAdvanceMode.Visibility = Visibility.Collapsed;
                        WidthHeightPanels.Visibility = Visibility.Visible;
                    }
                    break;
                case -1:
                    DescriptionNotice.Visibility = Visibility.Visible;
                    IframePanel.Visibility = Visibility.Collapsed;
                    WidthHeightPanels.Visibility = Visibility.Collapsed;
                    RawPanel.Visibility = Visibility.Collapsed;
                    DesignerPanel.Visibility = Visibility.Collapsed;
                    DescriptionType = NodeDescriptionType.None;
                    CbRichTextAdvanceMode.Visibility = Visibility.Collapsed;
                    break;
            }
            _previousSelection = DescriptionTypeSelector.SelectedIndex;
        }