- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
public Operation.OperationStatus OperState
{
get { return fOperState; }
set
{
fOperState = value;
// Надписи кнопок смены статуса
TOperation.TOperationState
OperationState = TOperation.OperationState(value);
btnOldState.Text = OperationState.OldName;
btnNewState.Text = OperationState.NewName;
// Видимость кнопок смены статуса
switch (value)
{
case Operation.OperationStatus.New :
btnOldState.Visible = OperationState.OldName.Length > 0 && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && OwnerOper.AccessInput && !ReadOnlyMode;
break;
case Operation.OperationStatus.DataInput :
btnOldState.Visible = OperationState.OldName.Length > 0 && OwnerOper.AccessInput && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && OwnerOper.AccessCheck && !ReadOnlyMode;
break;
case Operation.OperationStatus.DataCheck :
btnOldState.Visible = OperationState.OldName.Length > 0 && OwnerOper.AccessCheck && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && OwnerOper.AccessConfirm && !ReadOnlyMode;
break;
case Operation.OperationStatus.Closed :
btnOldState.Visible = OperationState.OldName.Length > 0 && OwnerOper.AccessConfirm && !ReadOnlyMode;
btnNewState.Visible = OperationState.NewName.Length > 0 && !ReadOnlyMode;
break;
}
}
}
public static TOperationState OperationState(Operation.OperationStatus pState)
{
TOperationState Result = new TOperationState();
switch (pState)
{
case Operation.OperationStatus.New :
Result.OldName = "";
Result.NewName = "Данные введены";
break;
case Operation.OperationStatus.DataInput :
Result.OldName = "Отменить \"Данные введены\"";
Result.NewName = "Данные проверены";
break;
case Operation.OperationStatus.DataCheck :
Result.OldName = "Отменить \"Данные проверены\"";
Result.NewName = "Завершена";
break;
case Operation.OperationStatus.Closed :
Result.OldName = "Отменить \"Завершена\"";
Result.NewName = "";
break;
}
return Result;
}
Lure Of Chaos 18.04.2012 20:13 # 0
lucidfoxGovno 18.04.2012 21:54 # 0
gcoder 20.04.2012 16:44 # 0