예제 #1
0
        private static void PropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs args)
        {
            MyTextBlock thisTextbox = dependencyObject as MyTextBlock;

            thisTextbox.UpdateHoverSize();
            Thickness textboxMargin = thisTextbox.Margin;

            thisTextbox._hovertext.Visibility = Visibility.Visible;

            //gem margin top engang så den sider rigtig
            if (thisTextbox.marginTop == -1)
            {
                thisTextbox.marginTop = textboxMargin.Top;
            }

            //flyt på textboxen
            if (thisTextbox.ShowAlwaysPlaceholderOnTop)
            {
                textboxMargin.Top = thisTextbox._hovertext.ActualHeight + thisTextbox.marginTop;
            }
            else
            {
                textboxMargin.Top = thisTextbox.marginTop;
            }


            thisTextbox.Margin = textboxMargin;

            //om de skal være synlige
            if (thisTextbox.ShowAlwaysPlaceholderOnTop)
            {
                thisTextbox.placeholder.Visibility = Visibility.Collapsed;
                thisTextbox._hovertext.Visibility  = Visibility.Visible;
            }
            else
            {
                //gør så den vis og skjule placeholder alt efter om der er skrevet noget
                Binding textEmpty = new Binding("Text.IsEmpty");
                textEmpty.ElementName = "Input";
                textEmpty.Converter   = thisTextbox.FindResource("PlaceholderConverter") as IValueConverter;

                thisTextbox.placeholder.SetBinding(VisibilityProperty, textEmpty);
                thisTextbox._hovertext.Visibility = Visibility.Collapsed;
            }
        }
예제 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._Textblock = ((TecCargo_Faktura.Controls.MyTextBlock)(target));
                return;

            case 2:
                this.Input = ((System.Windows.Controls.TextBox)(target));

            #line 24 "..\..\..\Controls\TextBlock.xaml"
                this.Input.KeyDown += new System.Windows.Input.KeyEventHandler(this.Input_KeyDown);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
예제 #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._UserPanel = ((TecCargo_Faktura.WindowsView.UserPanel)(target));
                return;

            case 2:
                this.ScrollViewBox = ((System.Windows.Controls.ScrollViewer)(target));

            #line 31 "..\..\..\WindowsView\UserPanel.xaml"
                this.ScrollViewBox.ScrollChanged += new System.Windows.Controls.ScrollChangedEventHandler(this.ScrollViewBox_ScrollChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.Grid_Viewbox = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.Address_Afsender = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 5:
                this.Address_Modtager = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 6:
                this.Address_Modtager2 = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 7:
                this.MyTextbox_Generelt_Reference = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 8:
                this.MyTextbox_Generelt_Fragtmand = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 9:
                this.DateTimePicker_Generelt_Rute_1 = ((TecCargo_Faktura.Controls.DateTimePicker)(target));
                return;

            case 10:
                this.MyTextbox_Generelt_Rute_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 11:
                this.DateTimePicker_Generelt_Rute_2 = ((TecCargo_Faktura.Controls.DateTimePicker)(target));
                return;

            case 12:
                this.MyTextbox_Generelt_Rute_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 13:
                this.Selector_Generelt_Forsikringstype = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 14:
                this.CheckBoxButton_Byttepaller = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 15:
                this.MyTextbox_Byttepaller_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 16:
                this.MyTextbox_Byttepaller_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 17:
                this.MyTextbox_Byttepaller_3 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 18:
                this.CheckBoxButton_Efterkrav = ((TecCargo_Faktura.Controls.CheckBoxButton)(target));
                return;

            case 19:
                this.MyTextbox_Efterkrav_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 20:
                this.MyTextbox_Efterkrav_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 21:
                this.MyTextbox_Efterkrav_3 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 22:
                this.MyTextbox_Efterkrav_4 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 23:
                this.Selector_Transport1 = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 24:
                this.Selector_Transport2 = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 25:
                this.Selector_Transport3 = ((TecCargo_Faktura.Controls.Selector)(target));
                return;

            case 26:
                this.PakkeControl_Transport = ((TecCargo_Faktura.Controls.PakkeControl)(target));
                return;

            case 27:
                this.MyTextBlock_Notifications = ((TecCargo_Faktura.Controls.MyTextBlock)(target));
                return;

            case 28:
                this.Grid_CheckStatusContainer = ((System.Windows.Controls.Grid)(target));

            #line 187 "..\..\..\WindowsView\UserPanel.xaml"
                this.Grid_CheckStatusContainer.IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.Grid_StatusCheck_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 29:

            #line 194 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Grid)(target)).IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.Grid_PDFView_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 30:
                this.MyDocumentViewer_PDFViewer = ((TecCargo_Faktura.Controls.MyDocumentViewer)(target));
                return;

            case 31:
                this.DateTimePicker_Afslut_Leveringsdato = ((TecCargo_Faktura.Controls.DateTimePicker)(target));
                return;

            case 32:
                this.MyTextbox_Afslut_Rabat = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 33:
                this.MyTextbox_Afslut_Kilometer = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 34:
                this.MyTextbox_Afslut_Tidsforbrug_1 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 35:
                this.MyTextbox_Afslut_Tidsforbrug_2 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 36:
                this.MyTextbox_Afslut_Tidsforbrug_3 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 37:
                this.MyTextbox_Afslut_Tidsforbrug_4 = ((TecCargo_Faktura.Controls.MyTextbox)(target));
                return;

            case 38:
                this.MyTextBlock_Afslut_Kommentar = ((TecCargo_Faktura.Controls.MyTextBlock)(target));
                return;

            case 39:
                this.Address_Faktura = ((TecCargo_Faktura.Controls.Address)(target));
                return;

            case 40:
                this.Gebyr_Ekstra = ((TecCargo_Faktura.Controls.Gebyr)(target));
                return;

            case 41:
                this.Button_GridViewBack = ((System.Windows.Controls.Button)(target));

            #line 318 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_GridViewBack.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 42:
                this.Button_GridViewNext = ((System.Windows.Controls.Button)(target));

            #line 333 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_GridViewNext.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 43:
                this.Prislist_faktura = ((TecCargo_Faktura.Controls.PrisList)(target));
                return;

            case 44:
                this.Image_ButtomStatusFragt = ((System.Windows.Controls.Image)(target));
                return;

            case 45:
                this.Image_ButtomStatusFaktura = ((System.Windows.Controls.Image)(target));
                return;

            case 46:

            #line 418 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolsbarButton_Filer_Click);

            #line default
            #line hidden
                return;

            case 47:

            #line 419 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ButtonAdmin_Startmenu_Click);

            #line default
            #line hidden
                return;

            case 48:
                this.Button_Save = ((System.Windows.Controls.Button)(target));

            #line 428 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_Save.Click += new System.Windows.RoutedEventHandler(this.toolbarButton_save_Click);

            #line default
            #line hidden
                return;

            case 49:

            #line 432 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.toolbarButton_PDF_Click);

            #line default
            #line hidden
                return;

            case 50:

            #line 436 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.toolbarButton_new_Click);

            #line default
            #line hidden
                return;

            case 51:

            #line 449 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_Test);

            #line default
            #line hidden
                return;

            case 52:

            #line 453 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_Test);

            #line default
            #line hidden
                return;

            case 53:

            #line 457 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_Test);

            #line default
            #line hidden
                return;

            case 54:
                this.Slider_Zoom = ((System.Windows.Controls.Slider)(target));

            #line 470 "..\..\..\WindowsView\UserPanel.xaml"
                this.Slider_Zoom.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.Slider_ValueChanged);

            #line default
            #line hidden
                return;

            case 55:

            #line 482 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_ChangeOptions_Click);

            #line default
            #line hidden
                return;

            case 56:

            #line 486 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_ChangeOptions_Click);

            #line default
            #line hidden
                return;

            case 57:

            #line 490 "..\..\..\WindowsView\UserPanel.xaml"
                ((System.Windows.Controls.Primitives.ToggleButton)(target)).Click += new System.Windows.RoutedEventHandler(this.ToolBarButton_ChangeOptions_Click);

            #line default
            #line hidden
                return;

            case 58:
                this.Line_ViewSelector_FragtFirstH = ((System.Windows.Shapes.Line)(target));
                return;

            case 59:
                this.TextBlock_ViewSelector_Fragt = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 60:
                this.Line_ViewSelector_FragtLastH = ((System.Windows.Shapes.Line)(target));
                return;

            case 61:
                this.Line_ViewSelector_FakturaFirstH = ((System.Windows.Shapes.Line)(target));
                return;

            case 62:
                this.TextBlock_ViewSelector_Faktura = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 63:
                this.Line_ViewSelector_FakturaLastH = ((System.Windows.Shapes.Line)(target));
                return;

            case 64:
                this.Border_ViewSelectorBox = ((System.Windows.Controls.Border)(target));
                return;

            case 65:
                this.Button_ViewSelectorBack = ((System.Windows.Controls.Button)(target));

            #line 557 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_ViewSelectorBack.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 66:
                this.Border_ViewSelector = ((System.Windows.Controls.Border)(target));
                return;

            case 67:
                this.Grid_ViewSelectorContainer = ((System.Windows.Controls.Grid)(target));
                return;

            case 68:
                this.Button_ViewSelectorNext = ((System.Windows.Controls.Button)(target));

            #line 582 "..\..\..\WindowsView\UserPanel.xaml"
                this.Button_ViewSelectorNext.Click += new System.Windows.RoutedEventHandler(this.Button_ViewSelectorChangeView_Click);

            #line default
            #line hidden
                return;

            case 69:
                this.ToolsbarMenu_Filer = ((System.Windows.Controls.ListBox)(target));
                return;

            case 70:
                this.toolbarButtonListSave = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 71:
                this.toolbarList_PDF = ((System.Windows.Controls.ListBoxItem)(target));
                return;

            case 72:
                this.ButtonTool_CloseFragtbrev = ((System.Windows.Controls.Button)(target));
                return;

            case 73:
                this.ButtonTool_CloseFragtbrevComment = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._Textblock = ((TecCargo_Faktura.Controls.MyTextBlock)(target));

            #line 9 "..\..\..\Controls\MyTextBlock.xaml"
                this._Textblock.Loaded += new System.Windows.RoutedEventHandler(this._Textblock_Loaded);

            #line default
            #line hidden

            #line 10 "..\..\..\Controls\MyTextBlock.xaml"
                this._Textblock.MouseEnter += new System.Windows.Input.MouseEventHandler(this._Textblock_MouseEnter);

            #line default
            #line hidden

            #line 11 "..\..\..\Controls\MyTextBlock.xaml"
                this._Textblock.MouseLeave += new System.Windows.Input.MouseEventHandler(this._Textblock_MouseEnter);

            #line default
            #line hidden
                return;

            case 2:

            #line 19 "..\..\..\Controls\MyTextBlock.xaml"
                ((System.Windows.Controls.Grid)(target)).IsEnabledChanged += new System.Windows.DependencyPropertyChangedEventHandler(this._Grid_IsEnabledChanged);

            #line default
            #line hidden
                return;

            case 3:
                this._hovertext = ((System.Windows.Controls.Label)(target));

            #line 32 "..\..\..\Controls\MyTextBlock.xaml"
                this._hovertext.MouseEnter += new System.Windows.Input.MouseEventHandler(this._Textblock_MouseEnter);

            #line default
            #line hidden
                return;

            case 4:
                this.placeholder = ((System.Windows.Controls.TextBlock)(target));

            #line 44 "..\..\..\Controls\MyTextBlock.xaml"
                this.placeholder.IsVisibleChanged += new System.Windows.DependencyPropertyChangedEventHandler(this.placeholder_IsVisibleChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.textboxScroll = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 6:
                this.Input = ((System.Windows.Controls.TextBox)(target));

            #line 59 "..\..\..\Controls\MyTextBlock.xaml"
                this.Input.SizeChanged += new System.Windows.SizeChangedEventHandler(this.Input_SizeChanged);

            #line default
            #line hidden

            #line 60 "..\..\..\Controls\MyTextBlock.xaml"
                this.Input.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.Input_TextChanged);

            #line default
            #line hidden

            #line 61 "..\..\..\Controls\MyTextBlock.xaml"
                this.Input.LostFocus += new System.Windows.RoutedEventHandler(this.Input_LostFocus);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }