private void HyperlinkButton_AnswerClick(object sender, RoutedEventArgs e)
        {
            RadWindow              win = new RadWindow();
            EstimateDetails        pag = new EstimateDetails();
            Grid                   gr  = (Grid)((HyperlinkButton)e.OriginalSource).Parent;
            ValidationErrorMessage er  = ((GridViewCell)(gr.Parent)).ParentRow.DataContext as ValidationErrorMessage;

            mrsClient = new RetailSystemClient();
            mrsClient.Endpoint.Address     = new System.ServiceModel.EndpointAddress(Internal.Utilities.GetMetriconRetailSystemWcfClientEndpointUrl());
            mrsClient.GetPagByIDCompleted += delegate(object o, GetPagByIDCompletedEventArgs es)
            {
                if (es.Error == null)
                {
                    pag = es.Result;
                    AppOptionFromTree acceptDlg = new AppOptionFromTree(pag, "STUDIOM_ANSWER", 0);
                    win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                    win.Header  = "Add Option Window";
                    win.Content = acceptDlg;
                    win.Closed += new EventHandler <WindowClosedEventArgs>(win_AddOptionClosed);
                    win.ShowDialog();
                }
                else
                {
                    ExceptionHandler.PopUpErrorMessage(es.Error, "GetPagByIDCompleted");
                }
            };
            mrsClient.GetPagByIDAsync(estimaterevisionid, er.HomeDisplayOptionId);
        }
Example #2
0
        public static RadWindow OpenCustomWindow(string header, Page page, Action callback)
        {
            try
            {
                RadWindow window = new RadWindow();

                window.Style = Application.Current.Resources["DefaultWindowStyle"] as Style;

                window.Header = header;
                window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                window.WindowState           = WindowState.Maximized;

                window.Content = page;
                window.Opacity = 1;
                window.Closed += (o, e) =>
                {
                    Tools.PerformOutEffect(window).Begin();

                    if (callback != null)
                    {
                        callback();
                    }
                };


                window.ShowDialog();
                Tools.PerformInEffect(window).Begin();
                return(window);
            }
            catch (Exception e)
            {
                return(null);
            }
        }
Example #3
0
 public RadWindow ShowDialog(object view, string title, Enum_WindowSize windowSize = Enum_WindowSize.None)
 {
     if (view is Window)
     {
         (view as Window).ShowDialog();
     }
     else
     {
         RadWindow window = new RadWindow();
         window.Content = view;
         window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
         //window.Width = 700;
         //window.Height = 500;
         window.Background = Brushes.Beige;
         window.BringToFront();
         if (windowSize == Enum_WindowSize.Maximized)
         {
             window.WindowState = WindowState.Maximized;
         }
         else if (windowSize == Enum_WindowSize.Big)
         {
             window.Width  = 900;
             window.Height = 700;
         }
         else if (windowSize == Enum_WindowSize.Vertical)
         {
             window.Width  = 350;
             window.Height = 500;
         }
         window.Header = title;
         window.ShowDialog();
         return(window);
     }
     return(null);
 }
Example #4
0
        public MyUILibrary.Temp.ConfirmResul ShowConfirm(string title, string message, UserPromptMode dialogMode)
        {
            //if (MessageBox.Show(text, title, MessageBoxButton.YesNo) == MessageBoxResult.Yes)
            //    return MyUILibrary.Temp.ConfirmResul.Yes;
            //else
            //    return MyUILibrary.Temp.ConfirmResul.No;

            UC_Prompt view      = new MyUIGenerator.UC_Prompt(this, message, dialogMode);
            RadWindow radWindow = new RadWindow();

            radWindow.Content = view;
            radWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            radWindow.MinWidth           = 380;
            radWindow.MinHeight          = 170;
            radWindow.Header             = title;
            radWindow.HideMinimizeButton = true;
            radWindow.ShowDialog();
            if (view.Result == true)
            {
                return(ConfirmResul.Yes);
            }
            else if (view.Result == false)
            {
                return(ConfirmResul.No);
            }
            else
            {
                return(ConfirmResul.Unknown);
            }
        }
Example #5
0
 private void Print()
 {
     if (_estimateVariationDisclaimerCurrentId != _estimateVariationDisclaimerNewId)
     {
         RadWindow win = new RadWindow();
         VariationPrintSelection previewDlg = new VariationPrintSelection(_estimateRevisionId, "Variation Print Disclaimer Update Selection", checkBoxDoNotIncludeProductNameAndCode.IsChecked == false, checkBoxDoNotIncludeUOMAndQuantity.IsChecked == false, checkBoxDoNotIncludeContractPriceOnVariation.IsChecked == false, _estimateVariationDisclaimerCurrentId, _estimateVariationDisclaimerNewId, checkBoxIncludeSpecifications.IsChecked ?? true);
         win.Header = "Variation Print Disclaimer Update Selection";
         win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
         win.Content = previewDlg;
         win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed);
         win.ShowDialog();
     }
     else
     {
         if (_printType == "studiom")
         {
             System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("../PrintLoading.aspx?merge=0&type=" + _printType + "&EstimateRevisionId=" + _estimateRevisionId.ToString(), UriKind.Relative), "_blank", "toolbar=0,menubar=1,location=0,status=0,top=0,left=0,resizable=1");
             this.DialogResult = true;
             CloseRadWindow();
         }
         else if (_printType == "changeonly")
         {
             System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("../PrintVariation.aspx?merge=0&type=" + _printType + "&EstimateRevisionId=" + _estimateRevisionId.ToString() + "&IncludeProductNameAndCode=" + !checkBoxDoNotIncludeProductNameAndCode.IsChecked + "&IncludeUOMAndQuantity=" + !checkBoxDoNotIncludeUOMAndQuantity.IsChecked + "&IncludeContractPriceOnVariation=" + !checkBoxDoNotIncludeContractPriceOnVariation.IsChecked + "&includeSpecifications=" + checkBoxIncludeSpecifications.IsChecked, UriKind.Relative), "_blank", "toolbar=0,menubar=1,location=0,status=0,top=0,left=0,resizable=1");
             this.DialogResult = true;
             CloseRadWindow();
         }
         else
         {
             _mrsClient = new RetailSystemClient();
             _mrsClient.Endpoint.Address           = new System.ServiceModel.EndpointAddress(Internal.Utilities.GetMetriconRetailSystemWcfClientEndpointUrl());
             _mrsClient.GetAreaSurchargeCompleted += new EventHandler <GetAreaSurchargeCompletedEventArgs>(_mrsClient_GetAreaSurchargeCompleted);
             _mrsClient.GetAreaSurchargeAsync(_estimateRevisionId);
         }
     }
 }
        private void ShowAutoComplete(FormulaAutoCompleteKeyType keyType, string theWord)
        {
            bool currentList = false;
            bool mainEntity  = true;
            List <TableDrivedEntityDTO> entities = new List <TableDrivedEntityDTO>();

            if (keyType == FormulaAutoCompleteKeyType.DotOnly || keyType == FormulaAutoCompleteKeyType.AfterDotLeftCtrlSpace)
            {
                if (!string.IsNullOrEmpty(theWord))
                {
                    if (FormulaHepler.IsHelperType(theWord) != null)
                    {
                        var helperType = FormulaHepler.IsHelperType(theWord);
                        formulaAutoComplete.SetCurrentList(helperType);
                        currentList = true;
                    }
                    else if (IsKnownPhraseType(theWord))
                    {
                        if (IsEntity(theWord))
                        {
                            if (IsOneToOneEntity(theWord))
                            {
                                currentList = formulaAutoComplete.SetCurrentList(GetEntityNameFromWord(theWord));
                            }
                        }
                    }
                }
            }

            if (mainEntity || currentList)
            {
                formulaAutoComplete.SetTreeVisiblities(mainEntity, currentList);
                if (autoCompleteWindow == null)
                {
                    autoCompleteWindow                    = new RadWindow();
                    autoCompleteWindow.Header             = "";
                    autoCompleteWindow.Content            = formulaAutoComplete;
                    autoCompleteWindow.HideMinimizeButton = true;
                    autoCompleteWindow.HideMaximizeButton = true;
                    //   autoCompleteWindow.SizeToContent = true;
                    autoCompleteWindow.ResizeMode = ResizeMode.NoResize;
                }
                if (richTextBox != null)
                {
                    var aa = richTextBox.Document.CaretPosition;
                    autoCompleteWindow.Left = aa.Location.X + 50;
                    autoCompleteWindow.Top  = aa.Location.Y + 200;
                }
                autoCompleteWindow.ShowDialog();
            }
            //myPopup.BringIntoView();
            //myPopup.UpdateLayout();
            //myPopup.Focus();
            //myPopup.FlowDirection = System.Windows.FlowDirection.RightToLeft;
            //myPopup.Height = 400;
            //myPopup.PlacementTarget = ExpressionEditor;
            //myPopup.IsOpen = true;
            //myPopup.StaysOpen = true;
        }
Example #7
0
        private void btnHistory_Click(object sender, RoutedEventArgs e)
        {
            RadWindow       win        = new RadWindow();
            EstimateHistory historyDlg = new EstimateHistory(this.DataContext);

            win.Header = "Estimate History";
            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Content = historyDlg;
            win.ShowDialog();
        }
        private void showXamlBtn_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            RadWindow window = new RadWindow() { Width = 500, Height = 400, WindowStartupLocation = WindowStartupLocation.CenterOwner };

            TextBox textBox = new TextBox() { IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto };
            textBox.Text = (this.DataContext as ExampleDataContext).XamlData;
            window.Content = textBox;

            window.ShowDialog();
        }
Example #9
0
        private void HyperlinkButton_AddTemplate_Click(object sender, RoutedEventArgs e)
        {
            NewNotesTemplate noteDlg = new NewNotesTemplate(0);
            RadWindow        win     = new RadWindow();

            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed);
            win.Header  = "Add Note Template";
            win.Content = noteDlg;
            win.ShowDialog();
        }
Example #10
0
        private void InternalPrintButton_Click(object sender, RoutedEventArgs e)
        {
            RadWindow win = new RadWindow();
            InternalPrintSelection previewDlg = new InternalPrintSelection(_estimateRevisionId, "internal", checkBoxDoNotIncludeProductNameAndCode.IsChecked == false, checkBoxDoNotIncludeUOMAndQuantity.IsChecked == false, _estimateDisclaimerCurrentId, _estimateDisclaimerNewId, checkBoxIncludeSpecifications.IsChecked ?? true);

            win.Header = "Select Print Version";
            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Content = previewDlg;
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed);
            win.ShowDialog();
        }
Example #11
0
        private void btnCompare_Click(object sender, RoutedEventArgs e)
        {
            RadWindow        win        = new RadWindow();
            CompareEstimates compareDlg = new CompareEstimates(this.DataContext);

            win.Header = "Compare Estimates";
            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Content    = compareDlg;
            win.ResizeMode = ResizeMode.NoResize;
            win.ShowDialog();
        }
        private void OnContentClicked(object sender, RoutedEventArgs e)
        {
			InfoWindowContent infoWindowContent = new InfoWindowContent();
			infoWindowContent.DataContext = this.DataContext;
			RadWindow window = new RadWindow();
			window.Content = infoWindowContent;
			window.Header = "Image details..." ;
			window.ResizeMode = ResizeMode.NoResize;
			window.WindowStartupLocation=Controls.WindowStartupLocation.CenterScreen;
			window.ShowDialog();
        }
Example #13
0
        private void HyperlinkButton_Copy_Click(object sender, RoutedEventArgs e)
        {
            template = ((GridViewCell)((HyperlinkButton)e.OriginalSource).Parent).ParentRow.DataContext as NotesTemplateViewModel.NoteTemplate;

            NewNotesTemplate noteDlg = new NewNotesTemplate(template.TemplateID);
            RadWindow        win     = new RadWindow();

            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed);
            win.Header  = "Copying " + template.TemplateName;
            win.Content = noteDlg;
            win.ShowDialog();
        }
Example #14
0
        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            DocuSignDocStatusInfo docinfo = ((GridViewCell)((HyperlinkButton)e.OriginalSource).Parent).ParentRow.DataContext as DocuSignDocStatusInfo;

            RadWindow win = new RadWindow();

            win.ResizeMode = ResizeMode.NoResize;
            DocuSignHistory previewDlg2 = new DocuSignHistory(docinfo.envelopeId, _estimateRevisionId.ToString(), docinfo.versiontype, docinfo.printtype);

            win.Header = "DocuSign History";
            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Content = previewDlg2;
            win.ShowDialog();
        }
 public void AccountsView_SelectionChanged(object sender, SelectionChangeEventArgs e)
 {
     RadWindow window = new RadWindow();
     TDocs.BADSInfo selectedItem = AccountsView.SelectedItem as TDocs.BADSInfo;
     FilterDescriptor fd = new FilterDescriptor("accountNumber", FilterOperator.IsEqualTo, selectedItem.accountNumber);
     entitlementsDataSource.FilterDescriptors.Add(fd);
     
     window.Content = new BADSSheet(selectedItem);
     window.Header = "Account Data Sheet";
     window.Height = 620;
     window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
     window.ShowDialog();
     entitlementsDataSource.FilterDescriptors.Remove(fd);
 }
Example #16
0
        private void btnAddOption_Click(object sender, RoutedEventArgs e)
        {
            RadWindow       win = new RadWindow();
            EstimateDetails pag = ((GridViewCell)((HyperlinkButton)e.OriginalSource).Parent).ParentRow.DataContext as EstimateDetails;
            //if (!pag.AreaName.ToUpper().Contains("NON STANDARD"))
            //{
            ReplaceAppOptionFromTree acceptDlg = new ReplaceAppOptionFromTree(estimateSource, pag, "OPTIONTREE", 3);

            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Header  = "Replace Product Window";
            win.Content = acceptDlg;
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_AddOptionClosed);
            win.ShowDialog();
        }
Example #17
0
        public void ShowMessage(string title, string message, List <ResultDetail> details = null)
        {
            //   System.Windows.MessageBox.Show(message, title);
            UC_Message view      = new MyUIGenerator.UC_Message(this, message, details);
            RadWindow  radWindow = new RadWindow();

            radWindow.Content = view;
            radWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            radWindow.Width              = 380;
            radWindow.Height             = 170;
            radWindow.Header             = title;
            radWindow.HideMinimizeButton = true;
            radWindow.ShowDialog();
        }
        private void SeeLicense(object sender, MouseButtonEventArgs e)
        {
            RadWindow window = new RadWindow();

            window.Height                = 600;
            window.Width                 = 600;
            window.SizeToContent         = false;
            window.Content               = new LicenseInfoControl();
            window.Owner                 = Application.Current.MainWindow;
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            window.Header                = "Enter Connection";
            window.CanClose              = false;
            window.ShowDialog();
        }
Example #19
0
        private void ViewDocumentStructure_Click(object sender, RoutedEventArgs e)
        {
            var window = new RadWindow();

            //DocumentModelTreeViewer documentTreeViewer = new DocumentModelTreeViewer();
            //documentTreeViewer.DisplayDocumentLayoutTree(this.editor.Document);

            //window.Content = documentTreeViewer;
            window.Owner = this;

            window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            window.Width  = 600;
            window.Height = 750;

            window.ShowDialog();
        }
        private void HyperlinkButton_UpgradeClick(object sender, RoutedEventArgs e)
        {
            RadWindow win = new RadWindow();
            //EstimateDetails pag = new EstimateDetails();
            Grid gr = (Grid)((HyperlinkButton)e.OriginalSource).Parent;
            ValidationErrorMessage er = ((GridViewCell)(gr.Parent)).ParentRow.DataContext as ValidationErrorMessage;
            string productid          = (er.ErrorMessage.Replace("Standard Inclusion - ", "")).Replace(" should be added to estimate.", "");

            AddUpgradeFromStandardInclusion acceptDlg = new AddUpgradeFromStandardInclusion(estimaterevisionid, er.HomeDisplayOptionId, productid);

            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Header  = "Add Upgrade Window";
            win.Content = acceptDlg;
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_AddOptionClosed);
            win.ShowDialog();
        }
Example #21
0
        private void HyperlinkButton_AddItem_Click(object sender, RoutedEventArgs e)
        {
            NotesTemplateViewModel.NoteTemplate nt = ((GridViewCell)((HyperlinkButton)e.OriginalSource).Parent).ParentRow.DataContext as NotesTemplateViewModel.NoteTemplate;
            AddNotesTempateItems noteDlg           = new AddNotesTempateItems(nt.TemplateID.ToString());

            noteDlg.Title = "Add Items to Template -- " + nt.TemplateName;
            RadWindow win = new RadWindow();

            win.Height = 650;
            win.Width  = 900;
            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            win.Header  = "Add Items to Note Template";
            win.Closed += new EventHandler <WindowClosedEventArgs>(win_Closed);
            win.Content = noteDlg;
            win.ShowDialog();
        }
Example #22
0
 private void ShowWindow(object view, string title, Enum_WindowSize windowSize, bool hideMaximizeButton, bool dialog)
 {
     View = view;
     if (view is Window)
     {
         if (dialog)
         {
             (view as Window).ShowDialog();
         }
         else
         {
             (view as Window).Show();
         }
         (view as Window).Closed += DialogWindow_Closed;
     }
     else
     {
         RadWindow window = new RadWindow();
         window.Closed += Window_Closed;
         //window.SizeToContent = false;
         window.HideMaximizeButton    = hideMaximizeButton;
         window.Content               = view;
         window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
         //window.Width = 700;
         //window.Height = 500;
         //window.Background = Brushes.Beige;
         window.BringToFront();
         if (windowSize == Enum_WindowSize.Maximized)
         {
             window.WindowState = WindowState.Maximized;
         }
         else if (windowSize == Enum_WindowSize.Big)
         {
             window.Width  = 900;
             window.Height = 600;
         }
         window.Header = title;
         if (dialog)
         {
             window.ShowDialog();
         }
         else
         {
             window.Show();
         }
     }
 }
Example #23
0
        //private void RadContextMenu_ItemClick(object sender, RadRoutedEventArgs e)
        //{
        //    RadContextMenu menu = (RadContextMenu)sender;
        //    RadMenuItem clickedItem = e.OriginalSource as RadMenuItem;
        //    GridViewRow row = menu.GetClickedElement<GridViewRow>();

        //    if (clickedItem != null && row != null)
        //    {
        //        EstimateHeader estimate = (EstimateHeader)row.DataContext;

        //        string header = Convert.ToString(clickedItem.Header);
        //        int selectedEstimateRevisionId = estimate.RecordId;
        //        RadWindow win = new RadWindow();
        //        switch (header)
        //        {
        //            case "Print Preview":
        //                PrintPreview previewDlg = new PrintPreview(selectedEstimateRevisionId);
        //                win.Header = "Print Preview";
        //                win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
        //                win.Content = previewDlg;
        //                win.ShowDialog();
        //                break;

        //            default:
        //                break;
        //        }
        //    }
        //}

        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            HyperlinkButton btn = (HyperlinkButton)sender;
            GridViewRow     row = btn.GetVisualParent <GridViewRow>();

            if (row != null)
            {
                EstimateHeader estimate = (EstimateHeader)row.DataContext;
                int            selectedEstimateRevisionId = estimate.RecordId;
                RadWindow      win        = new RadWindow();
                PrintPreview   previewDlg = new PrintPreview(selectedEstimateRevisionId, estimate.RevisionTypeId, (estimate.RevisionTypeCode.ToLower().Contains("pc") || estimate.RevisionTypeCode.ToLower().Contains("contract") || estimate.RevisionTypeCode.ToLower().Contains("variation")) ? true : false);
                win.Header = "Print Preview";
                win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                win.Content = previewDlg;
                win.ShowDialog();
            }
        }
Example #24
0
        private void showXamlBtn_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            RadWindow window = new RadWindow()
            {
                Width = 500, Height = 400, WindowStartupLocation = WindowStartupLocation.CenterOwner
            };

            TextBox textBox = new TextBox()
            {
                IsReadOnly = true, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, HorizontalScrollBarVisibility = ScrollBarVisibility.Auto
            };

            textBox.Text   = (this.DataContext as ExampleDataContext).XamlData;
            window.Content = textBox;

            window.ShowDialog();
        }
Example #25
0
        public void PreviewVideo(Video video)
        {
            RadWindow window = new RadWindow();

            window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            window.WindowState           = WindowState.Normal;
            window.ResizeMode            = ResizeMode.NoResize;
            window.Header = string.Format(Resources.PlayerResources.PreviewVideoTitle, video.Title);
            window.Width  = 400;

            var player = new VideoMediaElement();

            player.Model = video;

            window.Content = player;
            window.ShowDialog();
        }
Example #26
0
        //public void PopulateDestinationEstimateNo()
        //{
        //    BusyIndicator1.IsBusy = true;

        //    _mrsClient.GetDestinationEstimateNoCompleted += new EventHandler<GetDestinationEstimateNoCompletedEventArgs>(_mrsClient_GetDestinationEstimateNoCompleted);
        //    _mrsClient.GetDestinationEstimateNoAsync(_estimateRevisionId);
        //}

        //void _mrsClient_GetDestinationEstimateNoCompleted(object sender, GetDestinationEstimateNoCompletedEventArgs e)
        //{
        //    if (e.Error == null)
        //    {
        //        _DestinationEstimateNo = e.Result;
        //        txtDestinationEstimateNo.Text = _DestinationEstimateNo;
        //    }
        //    else
        //        ExceptionHandler.PopUpErrorMessage(e.Error, "mrsClient_GetContractTypeCompleted");
        //    BusyIndicator1.IsBusy = false;
        //}

        void _mrsClient_CopyEstimateCheckDifferenceCompleted(object sender, CopyEstimateCheckDifferenceCompletedEventArgs e)
        {
            List <ValidationErrorMessage> result = new List <ValidationErrorMessage>();

            if (e != null)
            {
                if (e.Error == null)
                {
                    if (e.Result != null)
                    {
                        if (e.Result.Count > 0)
                        {
                            foreach (var p in e.Result)
                            {
                                result.Add(p);
                            }

                            RadWindow win = new RadWindow();
                            ShowValidationMessage2 messageDlg = new ShowValidationMessage2(result, true, estimaterevisionid, _sourceEstimateNo, _destinationEstimateNo); //estimaterevisionid);
                            win.Header = "The following items cannot be copied as it does not exist on the original estimate.";
                            win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                            win.Content = messageDlg;
                            win.Closed += new EventHandler <WindowClosedEventArgs>(ValidationWin_Closed);
                            win.ShowDialog();
                        }
                        else
                        {
                            // if no difference then copy all of them
                            _mrsClient.CopyEstimateCompleted += new EventHandler <CopyEstimateCompletedEventArgs>(_mrsClient_CopyEstimateCompleted);
                            _mrsClient.CopyEstimateAsync(_sourceEstimateNo.ToString(), _destinationEstimateNo.ToString());
                        }
                    }
                    else
                    {
                        // if no difference then copy all of them
                        _mrsClient.CopyEstimateCompleted += new EventHandler <CopyEstimateCompletedEventArgs>(_mrsClient_CopyEstimateCompleted);
                        _mrsClient.CopyEstimateAsync(_sourceEstimateNo.ToString(), _destinationEstimateNo.ToString());
                    }
                }
                else
                {
                    ExceptionHandler.PopUpErrorMessage(e.Error, "CopyEstimateCompleted");
                }
            }
        }
        private void ActivateTrialLicense(object obj)
        {
            RadWindow window = new RadWindow
            {
                Height                = 600,
                Width                 = 600,
                SizeToContent         = false,
                Content               = new RequestTrialLicenseControl(),
                Owner                 = Application.Current.MainWindow,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                Header                = LocHelper.GetWord("Activate Trial License"),
                CanClose              = false,
                HideMinimizeButton    = true,
                HideMaximizeButton    = true
            };

            window.ShowDialog();
        }
        private void ShowOptions(ColumnModel model)
        {
            RadWindow       rw  = new RadWindow();
            RadPropertyGrid rpg = new RadPropertyGrid();

            rpg.HorizontalAlignment           = HorizontalAlignment.Stretch;
            rpg.FieldIndicatorVisibility      = Visibility.Collapsed;
            rpg.LabelColumnWidth              = new GridLength(110);
            rpg.DescriptionPanelVisibility    = Visibility.Collapsed;
            rpg.SortAndGroupButtonsVisibility = Visibility.Collapsed;
            rpg.SearchBoxVisibility           = Visibility.Collapsed;
            rpg.Item   = model;
            rw.Content = rpg;
            rw.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            rw.Header  = "Export options";
            rw.Width   = 500;
            rw.Height  = 450;
            rw.Padding = new Thickness(3);
            rw.ShowDialog();
        }
        private void CreateNewRadWindow(System.Windows.Controls.UserControl winContent)
        {
            RadWindow newWin = new RadWindow();

            newWin.Header = "Ventana Dinamica (Rad)";
            newWin.Owner  = this;

            newWin.Width                 = 300;
            newWin.Height                = 300;
            newWin.ResizeMode            = ResizeMode.CanMinimize;
            newWin.WindowStartupLocation = WindowStartupLocation.CenterScreen;

            newWin.Content = winContent;

            // Modal
            newWin.ShowDialog();

            // Non-Modal
            // newWin.Show();
        }
        private async void EnterDBConnectionInfo(object sender, MouseButtonEventArgs e)
        {
            var connectionParameters = new ConnectionParameters();

            RadWindow window = new RadWindow();

            window.Height                = 600;
            window.Width                 = 600;
            window.SizeToContent         = false;
            window.Content               = connectionParameters;
            window.Owner                 = Application.Current.MainWindow;
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            window.Header                = "Enter Connection";
            window.CanClose              = false;
            window.ShowDialog();

            if (connectionParameters.CanConnect)
            {
                SettingsManager.Instance.AddOrUpdateSetting(SettingName.ConnectionString, connectionParameters.ConnectionInfo.ConnectionString);
                await Check();
            }
        }
        private void ShowConnectionInfo(object sender, MouseButtonEventArgs e)
        {
            var connectionParameters = new ConnectionParameters();

            connectionParameters.Background = Brushes.White;
            var connectionString = SettingsManager.Instance.GetSetting <string>(SettingName.ConnectionString);

            connectionParameters.ConnectionInfo.ConnectionString = connectionString;

            RadWindow window = new RadWindow();

            window.Background            = Brushes.Black;
            window.Height                = 600;
            window.Width                 = 600;
            window.SizeToContent         = false;
            window.Content               = connectionParameters;
            window.Owner                 = Application.Current.MainWindow;
            window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            window.Header                = "Enter Connection";
            window.CanClose              = true;
            window.ShowDialog();
        }
Example #32
0
        void _mrsClient_ValidateStudioMRevisionsCompleted(object sender, ValidateStudioMRevisionsCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                if (e.Result.Count > 0)
                {
                    List <ValidationErrorMessage> result = new List <ValidationErrorMessage>();
                    foreach (ValidationErrorMessage s in e.Result)
                    {
                        result.Add(s);
                    }

                    RadWindow             win        = new RadWindow();
                    ShowValidationMessage messageDlg = new ShowValidationMessage(result, false, _estimateRevisionId);
                    win.Header = "Validation Error Message";
                    win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
                    win.Content = messageDlg;
                    win.ShowDialog();

                    RadWindow window = this.ParentOfType <RadWindow>();
                    if (window != null)
                    {
                        window.DialogResult = true;
                        window.Close();
                    }
                }
                else
                {
                    txtMessage.Text         = "Do you really want to merge all Studio M revisions?";
                    OKButton.Visibility     = System.Windows.Visibility.Visible;
                    CancelButton.Visibility = System.Windows.Visibility.Visible;
                }
            }
            else
            {
                ExceptionHandler.PopUpErrorMessage(e.Error, "ValidateStudioMRevisionsCompleted");
            }
        }
Example #33
0
 private void btnPrint_Click(object sender, RoutedEventArgs e)
 {
     if (cmbRevision1.SelectedItem != null && cmbRevision2.SelectedItem != null)
     {
         string sourceId      = ((EstimateGridItem)cmbRevision1.SelectedItem).RecordId.ToString();
         string destinationId = ((EstimateGridItem)cmbRevision2.SelectedItem).RecordId.ToString();
         //List<Filter> filterlist= GetAllFilters();
         string          filter   = GetAllGridData();
         RadWindow       win      = new RadWindow();
         ComparisonPrint printDlg = new ComparisonPrint(sourceId, destinationId, filter);
         win.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
         win.Header  = "Print Estimate Comparison";
         win.Content = printDlg;
         win.ShowDialog();
     }
     else
     {
         DialogParameters param = new DialogParameters();
         param.Header  = "Estimate Revisions Required";
         param.Content = "Please specify both Source and Destination revisions to compare.";
         RadWindow.Alert(param);
     }
 }
        private void DataSheetButton_Click(object sender, RoutedEventArgs e)
        {
            RadButton button = sender as RadButton;
            GridViewRow row = button.ParentOfType<GridViewRow>();
            TDocs.AccountsView selectedAccount = (TDocs.AccountsView)row.Item;
            BADSSheet infoSheet = new BADSSheet(selectedAccount);

            RadWindow window = new RadWindow();
            window.Content = infoSheet;
            window.Header = "Account Data Sheet";
            window.Height = 620;
            window.WindowStartupLocation = Telerik.Windows.Controls.WindowStartupLocation.CenterScreen;
            window.ShowDialog();
        }
        void dataServiceDataSource_SubmittedChanges(object sender, DataServiceSubmittedChangesEventArgs e)
        {

            if (e.HasError)
            {
                RadWindow win = new RadWindow();
                win.Content = "error " + e.Error.ToString();
                win.ShowDialog();
            }
            
            AccountsdataServiceDataSource.Load();
        }
		private void ShowOptions(ColumnModel model)
		{
			RadWindow rw = new RadWindow();		
			RadPropertyGrid rpg = new RadPropertyGrid();
			rpg.HorizontalAlignment = HorizontalAlignment.Stretch;
			rpg.FieldIndicatorVisibility = Visibility.Collapsed;
			rpg.LabelColumnWidth = new GridLength(110);
			rpg.DescriptionPanelVisibility = Visibility.Collapsed;
			rpg.SortAndGroupButtonsVisibility = Visibility.Collapsed;
			rpg.SearchBoxVisibility = Visibility.Collapsed;		
			rpg.Item = model;
			rw.Content = rpg;
			rw.WindowStartupLocation = WindowStartupLocation.CenterScreen;
			rw.Header = "Export options";
			rw.Width = 500;
			rw.Height = 450;
			rw.Padding = new Thickness(3);
			rw.ShowDialog();
		}