Exemplo n.º 1
0
 // конструктор
 public WorkField(Main main, Size size, 
                  String filePath = null, Network net = null, 
                  Cursor cursor = null)
 {
     InitializeComponent();
     mainForm = main;
     InitializeContextControls();
     Dock = DockStyle.Fill;
     FieldSize = size;
     FilePath = filePath;
     Network = net == null ? new Network() : net;
     PicBoxCursor = cursor == null ? Cursors.Arrow : cursor;
     drawingTextLabels = new List<TextLabel>();
     SelectedElements = new List<IDrag>();
     drawingRouters = new List<Router>();
     drawingChannels = new List<Channel>();
     selectedRectangle = new Rectangle();
 }
Exemplo n.º 2
0
        private Main mainForm; // ссылка на главную форму

        #endregion Fields

        #region Constructors

        // конструктор
        public NetworkTable(Main main)
        {
            InitializeComponent();
            DoubleBuffered = true;
            mainForm = main;
        }
Exemplo n.º 3
0
        // загрузка формы
        private void NewFileForm_Load(object sender, EventArgs e)
        {
            mainForm = this.Owner as Main;

            minWidth = Drawing.screenSize.Width;
            minHeight = Drawing.screenSize.Height;

            txtName.Text = String.Format("New {0}", mainForm.FileNumber);
            txtWidth.Text = minWidth.ToString();
            txtHeight.Text = minHeight.ToString();
        }