private void DoctorFieldMessage(DocView doc)
        {
            if (doc == null)
            {
                return;
            }
            var query = from d in DataBaseManager.AllDoctors
                        where doc.Id == d.Id
                        select d;

            DutyDoctor       = query.First();
            IsDutyDocEnabled = false;
        }
        public XamarinSamplePage()
        {
            InitializeComponent();

            _viewBuilders = new ViewBuildersCollection();
            _viewBuilders.AddDefaultViewBuilders();
            var screenManager = new ScreenManager();
            var dialogService = new DialogService();

            var viewModel     = SalesHelpers.SampleViewModel(dialogService, screenManager);
            var viewModelBase = viewModel.InitNoScreen();
            var docContainer  = new DocView();

            docContainer.SetDoc(viewModelBase, _viewBuilders, "FirstScreenDummy");

            //stackContainer.Children.Add(docContainer);
        }
Beispiel #3
0
        private void Connectivity_ConnectivityChanged(object sender, ConnectivityChangedEventArgs e)
        {
            if (e.NetworkAccess == NetworkAccess.Internet)
            {
                WelcomeTextBlock.Text = "Welcome: Connected";
                DocView.Visibility    = Visibility.Visible;

                //    DocView.Source = new Uri("https://sway.office.com/EwLiN5p0i4jE91BX?ref=Link");
                DocView.Navigate(new Uri("https://sway.office.com/EwLiN5p0i4jE91BX?ref=Link"));
            }
            else
            {
                WelcomeTextBlock.Text = "Welcome:  No Internet Connection";
                if (!DocView.IsLoaded)
                {
                    DocView.Visibility = Visibility.Collapsed;
                }
                else
                {
                    DocView.Visibility = Visibility.Visible;
                }
            }
        }
Beispiel #4
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PreviewCtl));
     this.pdfViewer      = new PdfiumViewer.PdfViewer();
     this.webBrowser     = new System.Windows.Forms.WebBrowser();
     this.axWMP          = new AxWMPLib.AxWindowsMediaPlayer();
     this.videoPlayerCtl = new VideoPlayer.VideoPlayerCtl();
     this.imgView        = new cfw.ImgView();
     this.docView        = new cfw.DocView();
     this.zipView        = new cfw.ZipView();
     this.fileView       = new FileViewCtl.FileView();
     ((System.ComponentModel.ISupportInitialize)(this.axWMP)).BeginInit();
     this.SuspendLayout();
     //
     // pdfViewer
     //
     this.pdfViewer.Location = new System.Drawing.Point(3, 3);
     this.pdfViewer.Name     = "pdfViewer";
     this.pdfViewer.Size     = new System.Drawing.Size(122, 27);
     this.pdfViewer.TabIndex = 0;
     this.pdfViewer.Visible  = false;
     //
     // webBrowser
     //
     this.webBrowser.Location    = new System.Drawing.Point(5, 71);
     this.webBrowser.MinimumSize = new System.Drawing.Size(20, 20);
     this.webBrowser.Name        = "webBrowser";
     this.webBrowser.Size        = new System.Drawing.Size(120, 20);
     this.webBrowser.TabIndex    = 5;
     this.webBrowser.Visible     = false;
     //
     // axWMP
     //
     this.axWMP.Enabled  = true;
     this.axWMP.Location = new System.Drawing.Point(131, 101);
     this.axWMP.Name     = "axWMP";
     this.axWMP.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWMP.OcxState")));
     this.axWMP.Size     = new System.Drawing.Size(116, 34);
     this.axWMP.TabIndex = 10;
     this.axWMP.Visible  = false;
     //
     // videoPlayerCtl
     //
     this.videoPlayerCtl.Location    = new System.Drawing.Point(3, 101);
     this.videoPlayerCtl.MinimumSize = new System.Drawing.Size(100, 20);
     this.videoPlayerCtl.Name        = "videoPlayerCtl";
     this.videoPlayerCtl.Size        = new System.Drawing.Size(116, 57);
     this.videoPlayerCtl.TabIndex    = 9;
     this.videoPlayerCtl.URL         = "";
     this.videoPlayerCtl.Visible     = false;
     //
     // imgView
     //
     this.imgView.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.imgView.Location    = new System.Drawing.Point(131, 3);
     this.imgView.Margin      = new System.Windows.Forms.Padding(0);
     this.imgView.Name        = "imgView";
     this.imgView.Size        = new System.Drawing.Size(116, 32);
     this.imgView.TabIndex    = 7;
     this.imgView.Visible     = false;
     //
     // docView
     //
     this.docView.Location = new System.Drawing.Point(131, 70);
     this.docView.Name     = "docView";
     this.docView.Size     = new System.Drawing.Size(116, 21);
     this.docView.TabIndex = 6;
     this.docView.Visible  = false;
     //
     // zipView
     //
     this.zipView.Location = new System.Drawing.Point(131, 36);
     this.zipView.Name     = "zipView";
     this.zipView.Size     = new System.Drawing.Size(116, 27);
     this.zipView.TabIndex = 3;
     this.zipView.Visible  = false;
     //
     // fileView
     //
     this.fileView.Location = new System.Drawing.Point(3, 36);
     this.fileView.Margin   = new System.Windows.Forms.Padding(0, 3, 0, 3);
     this.fileView.Name     = "fileView";
     this.fileView.Size     = new System.Drawing.Size(122, 29);
     this.fileView.TabIndex = 2;
     this.fileView.Visible  = false;
     //
     // PreviewCtl
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.axWMP);
     this.Controls.Add(this.videoPlayerCtl);
     this.Controls.Add(this.imgView);
     this.Controls.Add(this.docView);
     this.Controls.Add(this.webBrowser);
     this.Controls.Add(this.zipView);
     this.Controls.Add(this.fileView);
     this.Controls.Add(this.pdfViewer);
     this.Name = "PreviewCtl";
     this.Size = new System.Drawing.Size(256, 161);
     ((System.ComponentModel.ISupportInitialize)(this.axWMP)).EndInit();
     this.ResumeLayout(false);
 }
Beispiel #5
0
        public XamlView()
        {
            InitializeComponent();

            _styles = new XamlStyles
            {
                DelimiterStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Color.FromRgb(240, 241, 242))) }
                },
                NameStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Color.FromRgb(103, 139, 176))) }
                },
                QuotesStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Color.FromRgb(235, 118, 0))) }
                },
                TextStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Colors.White)) }
                },
                AttributeStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Color.FromRgb(184, 201, 218))) }
                },
                AttributeValueStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Color.FromRgb(235, 118, 0))) }
                },
                ConstantValueStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Color.FromRgb(254, 204, 34))) }
                },
                ErrorStyle = new Style(typeof(Run))
                {
                    Setters = { new Setter(TextElement.ForegroundProperty, new SolidColorBrush(Color.FromRgb(254, 51, 51))) }
                },
                GeneralStyle = new Style(typeof(Paragraph))
                {
                    Setters =
                    {
                        new Setter(TextElement.BackgroundProperty, new SolidColorBrush(Color.FromRgb(34, 40, 42))),
                        new Setter(Block.TextAlignmentProperty,    TextAlignment.Left),
                        new Setter(TextElement.FontFamilyProperty, new FontFamily("Consolas"))
                    }
                }
            };
            _tabs            = new ObservableCollection <PropertyXaml>();
            Tabs.ItemsSource = _tabs;
            Tabs.SetBinding(Selector.SelectedItemProperty,
                            new Binding(SelectedTabProperty.Name)
            {
                Source = this, Mode = BindingMode.TwoWay
            });
            DocView.SetBinding(FlowDocumentScrollViewer.DocumentProperty,
                               new Binding(SelectedTabProperty.Name + "." + PropertyXaml.DocumentProperty.Name)
            {
                Source = this, FallbackValue = null
            });
        }