示例#1
0
        private void butAddMapArea_Click(object sender, EventArgs e)
        {
            //edit this entry
            if (gridEmployees.SelectedIndices == null ||
                gridEmployees.SelectedIndices.Length <= 0 ||
                gridEmployees.Rows[gridEmployees.SelectedIndices[0]].Tag == null ||
                !(gridEmployees.Rows[gridEmployees.SelectedIndices[0]].Tag is Employee))
            {
                MsgBox.Show(this, "Select an employee");
                return;
            }
            Employee        employee = (Employee)gridEmployees.Rows[gridEmployees.SelectedIndices[0]].Tag;
            FormMapAreaEdit FormEP   = new FormMapAreaEdit();

            FormEP.MapItem                     = new MapArea();
            FormEP.MapItem.IsNew               = true;
            FormEP.MapItem.Width               = 6;
            FormEP.MapItem.Height              = 6;
            FormEP.MapItem.ItemType            = MapItemType.Room;
            FormEP.MapItem.Extension           = employee.PhoneExt;
            FormEP.MapItem.Description         = "";
            FormEP.MapItem.MapAreaContainerNum = _mapCur.MapAreaContainerNum;
            if (FormEP.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            FillMap();
        }
示例#2
0
		private void MapAreaDisplayLabelControl_DoubleClick(object sender,System.EventArgs e) {
			if(!AllowEdit) {
				return;
			}
			//edit this display label
			FormMapAreaEdit FormEP=new FormMapAreaEdit();
			FormEP.MapItem=this.MapAreaItem;
			if(FormEP.ShowDialog(this)!=DialogResult.OK) {
				return;
			}
			if(MapAreaDisplayLabelChanged!=null) { //let anyone interested know that this display label was edited
				MapAreaDisplayLabelChanged(this,new EventArgs());
			}
		}
示例#3
0
 private void MapAreaRoomControl_DoubleClick(object sender,EventArgs e)
 {
     if(!AllowEdit) {
         return;
     }
     //edit this room
     FormMapAreaEdit FormEP=new FormMapAreaEdit();
     FormEP.MapItem=this.MapAreaItem;
     if(FormEP.ShowDialog(this)!=DialogResult.OK) {
         return;
     }
     if(MapAreaRoomChanged!=null) { //let anyone interested know that this cubicle was edited
         MapAreaRoomChanged(this,new EventArgs());
     }
 }
示例#4
0
        private void newLabelToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormMapAreaEdit FormEP = new FormMapAreaEdit();

            FormEP.MapItem          = new MapArea();
            FormEP.MapItem.IsNew    = true;
            FormEP.MapItem.Width    = 6;
            FormEP.MapItem.Height   = 6;
            FormEP.MapItem.ItemType = MapItemType.DisplayLabel;
            PointF xy = GetXYFromMenuLocation(sender);

            FormEP.MapItem.XPos = Math.Round(xy.X, 3);
            FormEP.MapItem.YPos = Math.Round(xy.Y, 3);
            if (FormEP.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            mapAreaPanel_MapAreaChanged(this, new EventArgs());
        }
示例#5
0
        private void MapAreaDisplayLabelControl_DoubleClick(object sender, System.EventArgs e)
        {
            if (!AllowEdit)
            {
                return;
            }
            //edit this display label
            FormMapAreaEdit FormEP = new FormMapAreaEdit();

            FormEP.MapItem = this.MapAreaItem;
            if (FormEP.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            if (MapAreaDisplayLabelChanged != null)            //let anyone interested know that this display label was edited
            {
                MapAreaDisplayLabelChanged(this, new EventArgs());
            }
        }
示例#6
0
        private void newCubicleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormMapAreaEdit FormEP = new FormMapAreaEdit();

            FormEP.MapItem          = new MapArea();
            FormEP.MapItem.IsNew    = true;
            FormEP.MapItem.Width    = 6;
            FormEP.MapItem.Height   = 6;
            FormEP.MapItem.ItemType = MapItemType.Room;
            PointF xy = GetXYFromMenuLocation(sender);

            FormEP.MapItem.XPos = Math.Round(xy.X, 3);
            FormEP.MapItem.YPos = Math.Round(xy.Y, 3);
            FormEP.MapItem.MapAreaContainerNum = _mapCur.MapAreaContainerNum;
            if (FormEP.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            FillMap();
        }
示例#7
0
文件: FormMapSetup.cs 项目: mnisl/OD
		private void butAddMapArea_Click(object sender,EventArgs e) {
			//edit this entry
			if(gridEmployees.SelectedIndices==null
				|| gridEmployees.SelectedIndices.Length<=0
				|| gridEmployees.Rows[gridEmployees.SelectedIndices[0]].Tag==null 
				|| !(gridEmployees.Rows[gridEmployees.SelectedIndices[0]].Tag is Employee)) {
				MsgBox.Show(this,"Select an employee");
				return;
			}
			Employee employee=(Employee)gridEmployees.Rows[gridEmployees.SelectedIndices[0]].Tag;
			FormMapAreaEdit FormEP=new FormMapAreaEdit();
			FormEP.MapItem=new MapArea();
			FormEP.MapItem.IsNew=true;
			FormEP.MapItem.Width=6;
			FormEP.MapItem.Height=6;
			FormEP.MapItem.ItemType=MapItemType.Room;
			FormEP.MapItem.Extension=employee.PhoneExt;
			FormEP.MapItem.Description="";
			if(FormEP.ShowDialog(this)!=DialogResult.OK) {
				return;
			}
			mapAreaPanel_MapAreaChanged(this,new EventArgs());
		}
示例#8
0
文件: FormMapSetup.cs 项目: mnisl/OD
		private void newLabelToolStripMenuItem_Click(object sender,EventArgs e) {
			FormMapAreaEdit FormEP=new FormMapAreaEdit();
			FormEP.MapItem=new MapArea();
			FormEP.MapItem.IsNew=true;
			FormEP.MapItem.Width=6;
			FormEP.MapItem.Height=6;
			FormEP.MapItem.ItemType=MapItemType.DisplayLabel;
			PointF xy=GetXYFromMenuLocation(sender);
			FormEP.MapItem.XPos=Math.Round(xy.X,3);
			FormEP.MapItem.YPos=Math.Round(xy.Y,3);
			if(FormEP.ShowDialog(this)!=DialogResult.OK) {
				return;
			}
			mapAreaPanel_MapAreaChanged(this,new EventArgs());
		}