Exemple #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="Main" /> class.
        /// </summary>
        // ReSharper disable once NotNullMemberIsNotInitialized - they are
        public Main()
        {
            InitializeComponent();
            InitializeGraphics();
            InitializeStyleManager();

            _changeLineTypeCmb.Name = TilingController.EditLineTool.ChangeLineTypeName;
            _changeLineTypeCmb.Items.Add(new ComboBoxValue <Type>("Line", typeof(Line)));
            _changeLineTypeCmb.Items.Add(new ComboBoxValue <Type>("Quadratic Curve", typeof(QuadraticBezierCurve)));
            _changeLineTypeCmb.Items.Add(new ComboBoxValue <Type>("Cubic Curve", typeof(CubicBezierCurve)));

            _centerTranslate    = Matrix3x2.CreateTranslation(_renderControl.Width / 2f, _renderControl.Height / 2f);
            _invCenterTranslate = Matrix3x2.CreateTranslation(-_renderControl.Width / 2f, -_renderControl.Height / 2f);
            UpdateScale();

            _statusInfoLabel.Text = string.Empty;

            _renderControl.MouseWheel += renderControl_MouseWheel;

            _selectTemplateDialog = new SelectTemplateDialog();

            _printDocument.SetGetTranformDelegate(GetPrintTransform);

            _printPreviewDialog.StartPosition = FormStartPosition.CenterParent;
            _printPreviewDialog.Size          = new Size(1000, 800);

            _tilingPrintSettingsDialog = new TilingPrintSettingsDialog(_printDocument, SelectTileAsync);

            Text = _documentName + @" - " + Resources.Main_Title;
        }
Exemple #2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="Main" /> class.
        /// </summary>
        // ReSharper disable once NotNullMemberIsNotInitialized - they are
        public Main()
        {
            InitializeComponent();
            InitializeGraphics();
            InitializeStyleManager();

            _changeLineTypeCmb.Name = TilingController.EditLineTool.ChangeLineTypeName;
            _changeLineTypeCmb.Items.Add(new ComboBoxValue<Type>("Line", typeof(Line)));
            _changeLineTypeCmb.Items.Add(new ComboBoxValue<Type>("Quadratic Curve", typeof(QuadraticBezierCurve)));
            _changeLineTypeCmb.Items.Add(new ComboBoxValue<Type>("Cubic Curve", typeof(CubicBezierCurve)));

            _centerTranslate = Matrix3x2.CreateTranslation(_renderControl.Width / 2f, _renderControl.Height / 2f);
            _invCenterTranslate = Matrix3x2.CreateTranslation(-_renderControl.Width / 2f, -_renderControl.Height / 2f);
            UpdateScale();

            _statusInfoLabel.Text = string.Empty;

            _renderControl.MouseWheel += renderControl_MouseWheel;

            _selectTemplateDialog = new SelectTemplateDialog();

            _printDocument.SetGetTranformDelegate(GetPrintTransform);

            _printPreviewDialog.StartPosition = FormStartPosition.CenterParent;
            _printPreviewDialog.Size = new Size(1000, 800);

            _tilingPrintSettingsDialog = new TilingPrintSettingsDialog(_printDocument, SelectTileAsync);

            Text = _documentName + @" - " + Resources.Main_Title;
        }