Exemplo n.º 1
0
 private void CreateWorkForm(TabCodon tabCodon, float mapwidth, float mapheight)
 {
     _WorkForm               = new WorkForm(this.mediator, mapwidth, mapheight, tabCodon.Text);
     _WorkForm.Text          = tabCodon.Text;
     _WorkForm.TabIdentifier = tabCodon.CodonName;
     RaiseNewTab(_WorkForm);
 }
Exemplo n.º 2
0
 private void toolStripZoom_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (this.mediator.ActiveWork != null)
     {
         WorkForm workForm = (WorkForm)this.mediator.ActiveWork;
         workForm.GraphControl.Zoom = float.Parse(toolStripZoom.SelectedItem.ToString()) / 100;
     }
 }
Exemplo n.º 3
0
        private void ButtonShape_Click(object sender, EventArgs e)
        {
            SCADAShapeButton button = sender as SCADAShapeButton;

            if (this.mediator.ActiveWork != null && (this.mediator.ActiveWork is WorkForm))
            {
                WorkForm mWorkForm = this.mediator.ActiveWork as WorkForm;
                mWorkForm.SetDrawShape(button.ShapeElement);
                ((WorkForm)this.mediator.ActiveWork).GraphControl.Cursor = DefaultCursor;
            }
        }
Exemplo n.º 4
0
        public DockContent CreateWorkForm(string Title, float width, float height, GraphAbstract site)
        {
            lastAdded = tabFactory.GetTab(new TabCodon("W" + GUIDTo16.GuidToLongID(), Title, TabTypes.WorkArea)
            {
                MapHeight = height, MapWidth = width
            }) as WorkForm;
            WorkForm work = lastAdded as WorkForm;

            work.GraphControl.Abstract = site;
            lastAdded.TabText          = Title;
            lastAdded.Text             = Title;
            OnShowTab(lastAdded);
            return(lastAdded);
        }
Exemplo n.º 5
0
 private void dockPanel_ActiveDocumentChanged(object sender, EventArgs e)
 {
     if (this.mediator.ActiveWork != null)
     {
         WorkForm workForm = (WorkForm)this.mediator.ActiveWork;
         for (int i = 0; i < toolStripZoom.Items.Count; i++)
         {
             if (toolStripZoom.Items[i].ToString() == Convert.ToInt32(workForm.GraphControl.Zoom * 100).ToString())
             {
                 toolStripZoom.SelectedIndex = i;
                 break;
             }
         }
     }
 }