Пример #1
0
        private void NewProject(object sender, RoutedEventArgs e)
        {
            var dialog = new WorkPanel();

            dialog.ShowDialog();
        }
Пример #2
0
        private void OpenFile(object sender, RoutedEventArgs e)
        {
            var dialog = new WorkPanel(true);

            dialog.ShowDialog();
        }
Пример #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MyWindow = ((Project.WorkPanel)(target));

            #line 12 "..\..\WorkPanel.xaml"
                this.MyWindow.Loaded += new System.Windows.RoutedEventHandler(this.OnLoad);

            #line default
            #line hidden
                return;

            case 2:

            #line 39 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.OpenFile);

            #line default
            #line hidden
                return;

            case 3:

            #line 44 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ClearCanvas);

            #line default
            #line hidden
                return;

            case 4:

            #line 49 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SaveToFile);

            #line default
            #line hidden
                return;

            case 5:

            #line 54 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.AddFigure);

            #line default
            #line hidden
                return;

            case 6:

            #line 60 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Exit);

            #line default
            #line hidden
                return;

            case 7:

            #line 67 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Rectangle);

            #line default
            #line hidden
                return;

            case 8:

            #line 72 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Trapeze);

            #line default
            #line hidden
                return;

            case 9:

            #line 78 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SetRectanglePoints);

            #line default
            #line hidden
                return;

            case 10:

            #line 83 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.SetTrapezePoints);

            #line default
            #line hidden
                return;

            case 11:

            #line 91 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ZoomIncrease);

            #line default
            #line hidden
                return;

            case 12:

            #line 96 "..\..\WorkPanel.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ZoomDecrease);

            #line default
            #line hidden
                return;

            case 13:
                this.MyCanvas = ((System.Windows.Controls.Canvas)(target));

            #line 106 "..\..\WorkPanel.xaml"
                this.MyCanvas.MouseMove += new System.Windows.Input.MouseEventHandler(this.OnMouseMove);

            #line default
            #line hidden

            #line 106 "..\..\WorkPanel.xaml"
                this.MyCanvas.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.SetPiont);

            #line default
            #line hidden
                return;

            case 14:
                this.ZoomBox = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 15:
                this.MousePosition = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 16:
                this.RightMenu = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 17:
                this.RightMenuShow = ((System.Windows.Controls.Button)(target));

            #line 124 "..\..\WorkPanel.xaml"
                this.RightMenuShow.Click += new System.Windows.RoutedEventHandler(this.RightMenuShowHandle);

            #line default
            #line hidden
                return;

            case 18:
                this.RightMenuHide = ((System.Windows.Controls.Button)(target));

            #line 133 "..\..\WorkPanel.xaml"
                this.RightMenuHide.Click += new System.Windows.RoutedEventHandler(this.RightMenuHideHandle);

            #line default
            #line hidden
                return;

            case 19:
                this.RightMenuContent = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 20:
                this.Parameters = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 21:
                this.TopRadius = ((System.Windows.Controls.TextBox)(target));

            #line 156 "..\..\WorkPanel.xaml"
                this.TopRadius.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeRadiusTop);

            #line default
            #line hidden
                return;

            case 22:
                this.BottomRadius = ((System.Windows.Controls.TextBox)(target));

            #line 160 "..\..\WorkPanel.xaml"
                this.BottomRadius.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeRadiusBottom);

            #line default
            #line hidden
                return;

            case 23:
                this.LeftRadius = ((System.Windows.Controls.TextBox)(target));

            #line 168 "..\..\WorkPanel.xaml"
                this.LeftRadius.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeRadiusLeft);

            #line default
            #line hidden
                return;

            case 24:
                this.RightRadius = ((System.Windows.Controls.TextBox)(target));

            #line 172 "..\..\WorkPanel.xaml"
                this.RightRadius.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeRadiusRight);

            #line default
            #line hidden
                return;

            case 25:
                this.Coordinates = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 26:
                this.Top_X0 = ((System.Windows.Controls.TextBox)(target));

            #line 183 "..\..\WorkPanel.xaml"
                this.Top_X0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 27:
                this.Top_Y0 = ((System.Windows.Controls.TextBox)(target));

            #line 185 "..\..\WorkPanel.xaml"
                this.Top_Y0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 28:
                this.Top_X1 = ((System.Windows.Controls.TextBox)(target));

            #line 189 "..\..\WorkPanel.xaml"
                this.Top_X1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 29:
                this.Top_Y1 = ((System.Windows.Controls.TextBox)(target));

            #line 191 "..\..\WorkPanel.xaml"
                this.Top_Y1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 30:
                this.Right_X0 = ((System.Windows.Controls.TextBox)(target));

            #line 196 "..\..\WorkPanel.xaml"
                this.Right_X0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 31:
                this.Right_Y0 = ((System.Windows.Controls.TextBox)(target));

            #line 198 "..\..\WorkPanel.xaml"
                this.Right_Y0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 32:
                this.Right_X1 = ((System.Windows.Controls.TextBox)(target));

            #line 202 "..\..\WorkPanel.xaml"
                this.Right_X1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 33:
                this.Right_Y1 = ((System.Windows.Controls.TextBox)(target));

            #line 204 "..\..\WorkPanel.xaml"
                this.Right_Y1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 34:
                this.Bottom_X0 = ((System.Windows.Controls.TextBox)(target));

            #line 209 "..\..\WorkPanel.xaml"
                this.Bottom_X0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 35:
                this.Bottom_Y0 = ((System.Windows.Controls.TextBox)(target));

            #line 211 "..\..\WorkPanel.xaml"
                this.Bottom_Y0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 36:
                this.Bottom_X1 = ((System.Windows.Controls.TextBox)(target));

            #line 215 "..\..\WorkPanel.xaml"
                this.Bottom_X1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 37:
                this.Bottom_Y1 = ((System.Windows.Controls.TextBox)(target));

            #line 217 "..\..\WorkPanel.xaml"
                this.Bottom_Y1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 38:
                this.Left_X0 = ((System.Windows.Controls.TextBox)(target));

            #line 222 "..\..\WorkPanel.xaml"
                this.Left_X0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 39:
                this.Left_Y0 = ((System.Windows.Controls.TextBox)(target));

            #line 224 "..\..\WorkPanel.xaml"
                this.Left_Y0.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 40:
                this.Left_X1 = ((System.Windows.Controls.TextBox)(target));

            #line 228 "..\..\WorkPanel.xaml"
                this.Left_X1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 41:
                this.Left_Y1 = ((System.Windows.Controls.TextBox)(target));

            #line 230 "..\..\WorkPanel.xaml"
                this.Left_Y1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.ChangeCoordinates);

            #line default
            #line hidden
                return;

            case 42:
                this.FiguresPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 43:
                this.FiguresPanelShow = ((System.Windows.Controls.Button)(target));

            #line 244 "..\..\WorkPanel.xaml"
                this.FiguresPanelShow.Click += new System.Windows.RoutedEventHandler(this.FiguresPanelShowHandle);

            #line default
            #line hidden
                return;

            case 44:
                this.FiguresPanelHide = ((System.Windows.Controls.Button)(target));

            #line 253 "..\..\WorkPanel.xaml"
                this.FiguresPanelHide.Click += new System.Windows.RoutedEventHandler(this.FiguresPanelHideHandle);

            #line default
            #line hidden
                return;

            case 45:
                this.FiguresPanelContent = ((System.Windows.Controls.StackPanel)(target));
                return;
            }
            this._contentLoaded = true;
        }