コード例 #1
0
 private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
 {
     if (IsSelectionMode)
     {
         ListSelectedApptTypes = gridMain.SelectedTags <AppointmentType>();
         SelectedAptType       = ListSelectedApptTypes.FirstOrDefault();
         this.DialogResult     = DialogResult.OK;
     }
     else
     {
         FormApptTypeEdit FormATE = new FormApptTypeEdit();
         FormATE.AppointmentTypeCur = _listApptTypes[e.Row];
         FormATE.ShowDialog();
         if (FormATE.DialogResult != DialogResult.OK)
         {
             return;
         }
         if (FormATE.AppointmentTypeCur == null)
         {
             _listApptTypes.RemoveAt(e.Row);
         }
         else
         {
             _listApptTypes[e.Row] = FormATE.AppointmentTypeCur;
         }
         _isChanged = true;
         FillMain();
     }
 }
コード例 #2
0
        private void butAdd_Click(object sender, EventArgs e)
        {
            FormApptTypeEdit FormATE = new FormApptTypeEdit();

            FormATE.AppointmentTypeCur                      = new AppointmentType();
            FormATE.AppointmentTypeCur.ItemOrder            = _listApptTypes.Count;
            FormATE.AppointmentTypeCur.IsNew                = true;
            FormATE.AppointmentTypeCur.AppointmentTypeColor = Color.FromArgb(0);          //Default color to white, otherwise it picks a light gray.
            FormATE.ShowDialog();
            if (FormATE.DialogResult != DialogResult.OK)
            {
                return;
            }
            _listApptTypes.Add(FormATE.AppointmentTypeCur);
            _isChanged = true;
            FillMain();
        }
コード例 #3
0
ファイル: FormApptTypes.cs プロジェクト: mnisl/OD
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			FormApptTypeEdit FormATE=new FormApptTypeEdit();
			FormATE.AppointmentTypeCur=_listApptTypes[e.Row];
			FormATE.ShowDialog();
			if(FormATE.DialogResult!=DialogResult.OK) {
				return;
			}
			if(FormATE.AppointmentTypeCur==null) {
				_listApptTypes.RemoveAt(e.Row);
			}
			else {
				_listApptTypes[e.Row]=FormATE.AppointmentTypeCur;
			}
			_isChanged=true;
			FillMain();
		}
コード例 #4
0
ファイル: FormApptTypes.cs プロジェクト: mnisl/OD
		private void butAdd_Click(object sender,EventArgs e) {
			FormApptTypeEdit FormATE=new FormApptTypeEdit();
			FormATE.AppointmentTypeCur=new AppointmentType();
			FormATE.AppointmentTypeCur.ItemOrder=_listApptTypes.Count-1;
			FormATE.ShowDialog();
			if(FormATE.DialogResult!=DialogResult.OK) {
				return;
			}
			_listApptTypes.Add(FormATE.AppointmentTypeCur);
			_isChanged=true;
			FillMain();
		}