コード例 #1
0
        public PopUpDataGridViewChanges(EditWindowState windowState, int customerID, string forename, string surname, string address, int phonenumber,
                                        string email, float strenghtleft, float strenghtright, string notes, DateTime signupdate)
        {
            InitializeComponent();

            this.CurrentWindowState = windowState;
            this.Notes = notes;

            if (CurrentWindowState == EditWindowState.CustumerNotes)
            {
                richtextboxPopUpNotes.BringToFront();
                richtextboxPopUpNotes.Text = notes;
            }
            else if (CurrentWindowState == EditWindowState.CustumerEdit)
            {
                editPopUpCustomerControl1.BringToFront();
                editPopUpCustomerControl1.TextboxToNameCustomerEditPopUp.Text             = forename;
                editPopUpCustomerControl1.TextboxToSurnameCustomerEditPopUp.Text          = surname;
                editPopUpCustomerControl1.TextBoxAddressCustomerEditPopUp.Text            = address;
                editPopUpCustomerControl1.TextBoxPhoneCustomerEditPopUp.Text              = phonenumber.ToString();
                editPopUpCustomerControl1.TextBoxEmailCustomerEditPopUp.Text              = email;
                editPopUpCustomerControl1.TextBoxLeftStrenghtlabelCustomerEditPopUp.Text  = strenghtleft.ToString();
                editPopUpCustomerControl1.TextBoxRightStrenghtlabelCustomerEditPopUp.Text = strenghtright.ToString();
                editPopUpCustomerControl1.RichTextBoxNotesCustomerEditPopUp.Text          = notes;
            }

            this.CustomerID = customerID;
            this.SignupDate = signupdate;
        }
コード例 #2
0
        private void GreenOkButton_Click(object sender, RoutedEventArgs e)
        {
            switch (currentState)
            {
            case EditWindowState.Edit:

                if (myCropper.GetCroppedImage() != null)
                {
                    croppedImageList.Add(myCropper.GetCroppedImage());
                    imageRotationList.Add(myCropper.GetCurrentImageRotation());
                }

                PrintPreview printPreview = new PrintPreview();
                printPreview.PaperWidth       = A4Size.Width; //A4
                printPreview.PaperHeight      = A4Size.Height;
                printPreview.SelectedTypeItem = SelectedTypeItem;

                if (SelectedTypeItem.PrintSides == enumIdCardPrintSides.OneSide)
                {
                    borderContainer.Child = printPreview;
                    printPreview.Update();     //update after being a child
                    TitleBarText.Text = (string)this.TryFindResource("ResStr_Print_Preview");

                    colorPanel.Visibility     = System.Windows.Visibility.Hidden;
                    RotationButton.Visibility = System.Windows.Visibility.Hidden;
                    GreenOkButton.Margin      = new Thickness(-120, 0, 0, 5);
                }
                else
                {
                    if (FileSelectionPage.imageFileCount < 1)
                    {
                        this.DialogResult = true;
                    }
                    else
                    {
                        borderContainer.Child = printPreview;
                        printPreview.Update();
                        TitleBarText.Text = (string)this.TryFindResource("ResStr_Print_Preview");

                        colorPanel.Visibility     = System.Windows.Visibility.Hidden;
                        RotationButton.Visibility = System.Windows.Visibility.Hidden;
                        GreenOkButton.Margin      = new Thickness(-120, 0, 0, 5);
                    }
                }
                currentState = EditWindowState.Preview;
                break;

            case EditWindowState.Preview:
                this.DialogResult = true;
                break;

            default:
                break;
            }
        }
コード例 #3
0
        public PopUpDataGridViewChanges(EditWindowState windowState, int productID, string productName, float price, string colour,
                                        string brand, string frameType, string glassType, string productDescription = "", int?rightLensID = null, int?leftLensID = null)
        {
            InitializeComponent();
            this.CurrentWindowState = windowState;
            editProductUserControl1.BringToFront();
            editProductUserControl1.textBoxProductName.Text            = productName;
            editProductUserControl1.textBoxPrice.Text                  = Convert.ToString(price);
            editProductUserControl1.textBoxColour.Text                 = colour;
            editProductUserControl1.textBoxBrand.Text                  = brand;
            editProductUserControl1.textBoxFrametype.Text              = frameType;
            editProductUserControl1.textBoxGLasstype.Text              = glassType;
            editProductUserControl1.textboxRightlensID.Text            = Convert.ToString(rightLensID);
            editProductUserControl1.textBoxLeftLensID.Text             = Convert.ToString(leftLensID);
            editProductUserControl1.richTextBoxProductDescription.Text = productDescription;

            this.ProductID = productID;
        }
コード例 #4
0
 public IdCardEditWindow()
 {
     InitializeComponent();
     currentState = EditWindowState.Edit;
 }