private void button1_Click_1(object sender, EventArgs e)
        {
            //updating the path for the image

            string path = Directory.GetCurrentDirectory() + "..\\..\\..\\";

            wanted_path        = Path.GetDirectoryName(Path.GetDirectoryName(System.IO.Directory.GetCurrentDirectory()));
            result             = PrintButton.ShowDialog();
            PrintButton.Filter = "JPEG Files (*.jpeg)|*.jpeg|PNG Files (*.png)|*.png|JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif";
        }
 private void ConfigureComponents()
 {
     // load description
     description.LoadFile(new MemoryStream(Resources.description), RichTextBoxStreamType.RichText);
     // set commands for buttons
     OpenButton.SetCommand(Commands.Open, graphControl);
     PrintButton.SetCommand(Commands.Print, graphControl);
     ZoomInButton.SetCommand(Commands.IncreaseZoom, graphControl);
     ZoomOutButton.SetCommand(Commands.DecreaseZoom, graphControl);
     FitContentButton.SetCommand(Commands.FitGraphBounds, graphControl.FitContentViewMargins, graphControl);
 }
Beispiel #3
0
 void ReleaseDesignerOutlets()
 {
     if (PrintButton != null)
     {
         PrintButton.Dispose();
         PrintButton = null;
     }
     if (PrintersTableView != null)
     {
         PrintersTableView.Dispose();
         PrintersTableView = null;
     }
 }
        private void PrintLabs_Load(object sender, EventArgs e)
        {
            dateTimePicker1.Value = DateTime.Today;
            foreach (Control con in Controls)
            {
                con.Hide();
            }

            PrintButton.Show();
            CancelButton.Show();
            panel1.Show();

            this.Controls.Add(report);
        }
        private void PrintableReport_Load(object sender, EventArgs e)
        {
            dateTimePicker1.Value = DateTime.Today;
            foreach (Control con in Controls)
            {
                con.Hide();
            }

            PrintButton.Show();
            CancelButton.Show();
            panel1.Show();

            this.Controls.Add(report);
            report.BringToFront();
            report.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left;
        }
Beispiel #6
0
 private async void FunctionBar_OpeningAsync(object sender, object e)
 => await Dispatcher.RunAsync(CoreDispatcherPriority.Low,
                              () => PrintButton.Focus(FocusState.Programmatic)).AsTask().ConfigureAwait(false);