예제 #1
0
        public MainWindow()
        {
            InitializeComponent();

            doc = new DistanceDocument();
            doc.Changed += doc_Changed;
            doc.MicrophoneAdded += doc_MicrophoneAdded;
            doc.ReferencePointAdded += doc_ReferencePointAdded;

            calc = new Calculator(doc);
            dataGrid.DataContext = calc.Distances;

            doc.Plan = new ImageBrush(new BitmapImage(new Uri(BaseUriHelper.GetBaseUri(this), "Images/plan.jpg")));
            doc.Scale = 0.3; // meter per pixel
        }
예제 #2
0
        private void Main_Load(object sender, EventArgs e)
        {
            pMainArea.AllowDrop   = true;
            pMainArea.DragEnter  += pMainArea_DragEnter;
            pMainArea.DragDrop   += pMainArea_DragDrop;
            pMainArea.MouseClick += pMainArea_MouseClick;

            doc                  = new DistanceDocument();
            doc.Changed         += doc_Changed;
            doc.MicrophoneAdded += doc_MicrophoneAdded;

            calc = new Calculator.Calculator(doc);
            dataGridView1.DataSource = calc.Results;

            doc.Plan  = new Bitmap(@"C:\Users\Henrik\Documents\visual studio 2013\Projects\Distance\Distance\plan.jpg");
            doc.Scale = 0.3F; // meter per pixel
        }
예제 #3
0
        private void Main_Load(object sender, EventArgs e)
        {
            pMainArea.AllowDrop = true;
            pMainArea.DragEnter += pMainArea_DragEnter;
            pMainArea.DragDrop += pMainArea_DragDrop;
            pMainArea.MouseClick += pMainArea_MouseClick;

            doc = new DistanceDocument();
            doc.Changed += doc_Changed;
            doc.MicrophoneAdded += doc_MicrophoneAdded;

            calc = new Calculator.Calculator(doc);
            dataGridView1.DataSource = calc.Results;

            doc.Plan = new Bitmap(@"C:\Users\Henrik\Documents\visual studio 2013\Projects\Distance\Distance\plan.jpg");
            doc.Scale = 0.3F; // meter per pixel
        }