public void setModeCheckbox(EditMode mode) { if (mode == EditMode.Add) this.radioButtonAdd.IsChecked = true; if (mode == EditMode.Subtract) this.radioButtonSubtract.IsChecked = true; }
/// <summary> /// WE ARE ADDING A NEW DOC VERSION /// </summary> /// <param name="document"> The document. </param> public AddDocumentVersionModel(Document document, AddEditDocumentVersionDialog view) { DialogView = view; ProgressBarView = view as IProgressBarView; mDocument = document; mDocumentId = document.Id; mCurrentEditMode = EditMode.Add; mDocumentVersion = new DocumentVersion { DocumentId = document.Id }; mDocumentVersion.Date = DateTime.Now; OkButtonCommand = new DelegateCommand<object>(OkButtonHandler, CanExecuteOkButtonHandler); CancelButtonCommand = new DelegateCommand<object>(CancelButtonHander, CanExecuteOkButtonHandler); OpenFileDialogCommand = new DelegateCommand<object>(OpenFileDialogButtonHander, CanExecuteOkButtonHandler); mLatestVersion = (from x in document.DocumentVersions orderby x.Version descending select x).Take(1).FirstOrDefault(); if (mLatestVersion != null) { Version = mLatestVersion.Version; AutoIncrementVersion = false; RaisePropertyChanged("AutoIncrementVersion"); } if (DataModelLoaded != null) { DataModelLoaded(); } }
public InstrumentSourceRelationWindow(VmInstrument vmInstrument, EditMode editMode, VmInstrumentSourceRelation vmRelation = null) { InitializeComponent(); this._EditMode = editMode; this._vmInstrument = vmInstrument; this._originRelation = vmRelation; if (editMode == EditMode.AddNew) { this._Relation = new InstrumentSourceRelation() { InstrumentId = this._vmInstrument.Id, SwitchTimeout = 60, Priority = 30 }; this._Relation.IsActive = vmInstrument.SourceRelations.Count == 0; // Only for UI display(the backend can process normally) this._Relation.IsDefault = false; this.IsDefaultCheckBox.IsEnabled = false; } else { this._Relation = vmRelation.InstrumentSourceRelation.Clone(); this.SourcesComboBox.IsEnabled = false; } InstrumentCodeTextBlock.Text = vmInstrument.Code; this.BindSourcesComboBox(); this.DataContext = this._Relation; this._HintMessage = new HintMessage(this.HintTextBlock); this.Loaded += InstrumentSourceRelationWindow_Loaded; }
private int newRow = 0; // numero de la prochaine ligne d'insertion #endregion Fields #region Constructors public EditWnd(string title, EditMode mode = EditMode.Edit) { InitializeComponent(); // initialise l'interface switch (mode) { case EditMode.Edit: this.Title = "Editer: " + title; this.okBtn.Content = "Enregistrer"; break; case EditMode.Insert: this.Title = "Nouveau: " + title; this.okBtn.Content = "Ajouter"; break; case EditMode.Duplicate: this.Title = "Dupliquer: " + title; this.okBtn.Content = "Dupliquer"; break; default: this.Title = title; this.okBtn.Content = "OK"; break; } }
public void SetData(EditMode editMode,AIClipGroup clipGroup, AIClip dataToEdit, OnCreateNew createCallBack) { mDataUnit = dataToEdit; mClipGroup = clipGroup; mMode = editMode; onCreateNew = createCallBack; }
/// <summary> /// Initializes a new instance of the <see cref="FormEditAccent"/> class. /// </summary> /// <param name="editMode">The edit mode.</param> public FormEditAccent(EditMode editMode) { // Set the edit mode. this.editMode = editMode; InitializeComponent(); }
public FrmEditDeliveryNote(List<String> tranIdList) { InitializeComponent(); mEditMode = EditMode.CreateFromTrans; mTranIdList = tranIdList; }
public FrmEditDeliveryNote(String noteId) { InitializeComponent(); mEditMode = EditMode.EditExisting; mDeliveryNote = DeliveryNoteDAL.GetOneDeliveryNote(noteId); }
protected override void LoadViewState(object savedState) { base.LoadViewState(savedState); _clausePath = (string)ViewState[_KH_VSKEY_CLAUSEPATH]; _editMode = (EditMode)ViewState[_KH_VS_EDITMODE]; _ITATDocumentID = (Guid)ViewState[_KH_VS_ITATDOCUMENTID]; }
protected override void LoadViewState(object savedState) { base.LoadViewState(savedState); _workflowId = (Guid)ViewState[_KH_VS_WORKFLOWID]; _workflow = _template.FindWorkflow(_workflowId); _orgStates = (List<Business.State>)ViewState[_KH_VS_ORGSTATES]; _workflowEditMode = (EditMode)ViewState[_KH_VS_WORKFLOWEDITMODE]; }
public FrmEditSourcingNote(SourcingNoteType sourcingNote) { InitializeComponent(); mEditMode = EditMode.EditExisting; mSourcingNote = sourcingNote; }
public GroupWindow(ref Services services, ref Group group, EditMode mode) { InitializeComponent(); this.services = services; this.group = group; this.mode = mode; InitializeUI(); }
public EmployeeDetailViewModel(IEmployeeServiceClient employeeServiceClient, int employeeId, EditMode editMode) { this.employeeServiceClient = employeeServiceClient; this.editMode = editMode; this.Departments = new ObservableCollection<DepartmentDto>(); this.LoadEmployeeDetail(employeeId); }
public PersonWindow(ref Services services, ref Person person, EditMode mode) { InitializeComponent(); this.services = services; this.person = person; this.mode = mode; InitializeUI(); }
public FrmEditSupplier(int supplierId) { InitializeComponent(); mEditMode = EditMode.EditExsiting; mSupplierId = supplierId; ShowSupplierData(); }
public EditRecordViewModel(PersonViewModel person, EditMode mode) { if (person != null) { _id = person.Id; Name = person.Name; PhoneNumber = person.PhoneNumber; } Mode = mode; }
public EditWindow(EditMode mode, World world) { if (mode == EditMode.Animation) { animation.Visibility = Visibility.Visible; image.Visibility = Visibility.Collapsed; } currentMode = mode; world2render = world; InitializeComponent(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!IsPostBack) { if (Context.Items[Common.Names._CNTXT_WorkflowEditMode] != null) _editMode = (EditMode)Context.Items[Common.Names._CNTXT_WorkflowEditMode]; else _editMode = EditMode.None; txtWorkflowName.Text = Helper.GetDefaultWorkflowName(_template); } }
public void Initialize(BusinessLayer.Person kunde, BusinessLayer.Transaction transaction, BusinessLayer.Position position, BusinessLayer.Artikel artikel) { _kunde = kunde; _transaction = transaction; _tempPosition = position; _article = artikel; // set the modus if (position == null) this._modus = EditMode.INSERT; else this._modus = EditMode.UPDATE; }
protected override void LoadViewState(object savedState) { base.LoadViewState(savedState); _workflowId = (Guid)ViewState[_KH_VS_WORKFLOWID]; _workflow = _template.FindWorkflow(_workflowId); _stateIndex = (int)ViewState[_KH_VS_STATEINDEX]; _editMode = (EditMode)ViewState[_KH_VS_EDITMODE]; _workflowEditMode = (EditMode)ViewState[_KH_VS_WORKFLOWEDITMODE]; _state = _workflow.States[_stateIndex]; //(Business.State)ViewState[_KH_VS_STATE]; _orgStates = (List<Business.State>)ViewState[_KH_VS_ORGSTATES]; if (_template.SecurityModel == Kindred.Knect.ITAT.Business.SecurityModel.Advanced) { _currentTermGroupId = (Guid)ViewState[_KH_VS_CURRENTTERMGROUPID]; } }
public EditClient(Client client) { InitializeComponent(); this.Text = "编辑客户端"; editMode = EditMode.Edit; originalClient = client; for (int i = 0; i < Program.languageList.Length; i++) { if ((client.Region + " - " + client.Name + " - " + client.Locale) == Program.languageList[i]) { this.LanguageList.SelectedIndex = i; } } this.TextBox_GameFolder.Text = client.GameFolder; }
private void GetContextData() { if (Context.Items[Common.Names._CNTXT_EditMode] != null) _editMode = (EditMode)Context.Items[Common.Names._CNTXT_EditMode]; else _editMode = EditMode.Add; if (_editMode == EditMode.Edit) { _termGroupId = (Guid)Context.Items[Common.Names._CNTXT_TermGroupId]; _termGroup = _template.FindTermGroup(_termGroupId); } else { _termGroup = new TermGroup(Helper.GetDefaultTermGroupName(_template),String.Empty, _template.SecurityModel,Business.TermGroup.TermGroupType.AdvancedBasicTerm); _termGroupId = _termGroup.ID; } }
public StudQuizDataForm(DAO.UDT_StudQuizDataDef sqd,EditMode editMode,string StudentID) { InitializeComponent(); _EditMode = editMode; _RowNameList = new List<string>(); _StudQuizData = sqd; _UDTTransfer = new DAO.UDTTransfer(); _AllQuiz = _UDTTransfer.GetAllQuizData(); _quizFieldNameList = new List<DAO.SortData1>(); _StudentID = StudentID; _LogTransfer = new DAO.LogTransfer(); // 將測驗名稱放入 List<string> nameList = (from data in _AllQuiz orderby data.QuizName select data.QuizName).ToList(); cbxQuizName.Items.AddRange(nameList.ToArray()); ReLoadQuizFieldNameList(); }
public NewTaskWindow(EditMode editMode, TaskScheduler taskScheduler) { InitializeComponent(); this._App = ((ManagerConsole.MainWindow)Application.Current.MainWindow); this._EditMode = editMode; if (this._EditMode == EditMode.AddNew) { this._TaskScheduler = new TaskScheduler(); this._TaskScheduler.IsEditorName = true; this.LoadParameterSetting(); } else { this._EditorTaskScheduler = taskScheduler.Clone(); this.SettingsUIBinding(); } this._IsLoaded = true; }
/// <summary> /// Initializes a new instance of the <see cref="EditPlayerForm"/> class. /// </summary> /// <param name="editMode">The <see cref="EditMode"/> to be used.</param> /// <param name="teamDescriptor">The team descriptor.</param> /// <param name="playerId">The player database ID.</param> internal EditPlayerForm(EditMode editMode, string teamDescriptor, long playerId) : base() { this.editMode = editMode; this.teamDescriptor = teamDescriptor; this.playerId = playerId; database = Database.Instance; appConfig = ApplicationConfig.Instance; InitializeComponent(); cbxCountries.DataSource = appConfig.Countries; PreloadDatabaseInfo(); UpdateControls(); DefineHeaderText(); }
public DerivedInstrumentWindow(EditMode editMode, VmInstrument vmInstrument = null) { InitializeComponent(); this._EditMode = editMode; this._vmInstrument = vmInstrument; this._InstrumentData = new InstrumentData(); if (editMode == EditMode.AddNew) { this._InstrumentData.Instrument = new Instrument() { IsDerivative = true }; this._InstrumentData.DerivativeRelation = new DerivativeRelation() { AskOperand1Type = OperandType.Ask, AskOperand2Type = OperandType.Ask, AskOperator1Type = OperatorType.Multiply, AskOperator2Type = OperatorType.Multiply, AskOperand3 = 1, BidOperand1Type = OperandType.Bid, BidOperand2Type = OperandType.Bid, BidOperator1Type = OperatorType.Multiply, BidOperator2Type = OperatorType.Multiply, BidOperand3 = 1, LastOperand1Type = OperandType.Last, LastOperand2Type = OperandType.Last, LastOperator1Type = OperatorType.Multiply, LastOperator2Type = OperatorType.Multiply, LastOperand3 = 1, UnderlyingInstrument1IdInverted = false, UnderlyingInstrument2Id = null }; if(VmQuotationManager.Instance.Instruments.Count>0) { this._InstrumentData.DerivativeRelation.UnderlyingInstrument1Id = VmQuotationManager.Instance.Instruments[0].Id; } } else { this._InstrumentData.Instrument = vmInstrument.Instrument.Clone(); this._InstrumentData.DerivativeRelation = vmInstrument.VmDerivativeRelation.DerivativeRelation.Clone(); } this.DataContext = this._InstrumentData; this._HintMessage = new HintMessage(this.HintTextBlock); }
public RoomsEditorMapView(RoomsEditorControl editorControl) { InitializeComponent(); this.editorControl = editorControl; roomsNameCounter = 0; //textura default para los rooms defaultTextureDir = GuiController.Instance.ExamplesMediaDir + "Texturas\\"; defaultTextureImage = defaultTextureDir + "tierra.jpg"; texturesEdit = new RoomsEditorTexturesEdit(this); //Tamaño inicial del panel2 panel2d.MinimumSize = new Size((int)numericUpDownMapWidth.Value, (int)numericUpDownMapHeight.Value); //Estado actual radioButtonCreateRoom.Select(); currentMode = EditMode.CreateRoom; groupBoxEditRoom.Enabled = false; }
public AddEditMain(DBProvider db, string tableName, string code, EditMode mode) { InitializeComponent(); this.mode = mode; this.db = db; if (code == null) { txtCode.Text = (db.LoadMaxCode(false) + 1).ToString(); } else { var ds = db.ExecuteQuery(tableName, " where code = " + code, ""); if (ds != null && ds.Tables.Count > 0) { var vals = ds.Tables[0].Rows[0].ItemArray; txtCode.Text = vals[0].ToString(); txtName.Text = vals[1].ToString(); txtCountry.Text = vals[2].ToString(); txtSupplier.Text = vals[3].ToString(); txtSupplierNr.Text = vals[4].ToString(); txtLength.Text = vals[5].ToString(); txtWidth.Text = vals[6].ToString(); txtEKNetto.Text = vals[7].ToString(); txtVKNetto.Text = vals[8].ToString(); txtQuantity.Text = vals[9].ToString(); txtQMPrice.Text = vals[10].ToString(); txtDate.Text = vals[11].ToString(); txtMVDate.Text = vals[12].ToString(); txtInvoice.Text = vals[13].ToString(); txtColor.Text = vals[14].ToString(); txtMaterial.Text = vals[15].ToString(); txtComment.Text = vals[16].ToString(); txtInfo.Text = vals[17].ToString(); txtEuroStuck.Text = vals[18].ToString(); txtPaid.Text = vals[19].ToString(); } } }
public InstrumentWindow(EditMode editMode, VmInstrument vmInstrument = null) { InitializeComponent(); this._EditMode = editMode; this._vmInstrument = vmInstrument; this._InstrumentData = new InstrumentData(); if (editMode == EditMode.AddNew) { this._InstrumentData.Instrument = new Instrument() { IsDerivative = false, IsSwitchUseAgio = false, UseWeightedPrice = false }; this._InstrumentData.PriceRangeCheckRule = new PriceRangeCheckRule(); this._InstrumentData.WeightedPriceRule = new WeightedPriceRule(); } else { this._InstrumentData.Instrument = vmInstrument.Instrument.Clone(); this._InstrumentData.PriceRangeCheckRule = vmInstrument.VmPriceRangeCheckRule.PriceRangeCheckRule.Clone(); this._InstrumentData.WeightedPriceRule = vmInstrument.VmWeightedPriceRule.WeightedPriceRule.Clone(); } this.DataContext = this._InstrumentData; this._HintMessage = new HintMessage(this.HintTextBlock); }
void OnGUI() { if (GUI.Button(new Rect(10, 10, 80, 30), "UP1")) { editMode = EditMode.UP1; } if (GUI.Button(new Rect(100, 10, 80, 30), "UP2")) { editMode = EditMode.UP2; } if (GUI.Button(new Rect(190, 10, 80, 30), "DOWN1")) { editMode = EditMode.DOWN1; } if (GUI.Button(new Rect(280, 10, 80, 30), "DOWN2")) { editMode = EditMode.DOWN2; } }
public override void MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { CheckRightMouseDown(e); return; } if (MouseOnShape(e.Location) == false) { if (myMenu.DrawShape == false) { curMode = EditMode.GroupMode; } } else { curMode = EditMode.ShapeMode; } switch (curMode) { case EditMode.ShapeMode: Canvas.Cursor = Cursors.Default; ShapeMouseDownActions(e); break; case EditMode.GroupMode: GroupMouseDownAction(e); break; case EditMode.Nothing: curMode = EditMode.ShapeMode; ShapeMouseDownActions(e); break; } }
public static void EditModeSetup(EditMode __instance) { try { var cha = MakerAPI.GetCharacterControl() ?? throw new ArgumentNullException($"MakerAPI.GetCharacterControl()"); var co = cha.GetComponent <BoneController>() ?? throw new ArgumentNullException($"cha.GetComponent<BoneController>()"); void OnUpdate(float x) => co.NeedsBaselineUpdate = true; var t = Traverse.Create(__instance); foreach (var sliderUi in t.Field("face").Field <InputSliderUI[]>("sliders").Value) { sliderUi.AddOnChangeAction(OnUpdate); } foreach (var sliderUi in t.Field("body").Field <InputSliderUI[]>("sliders").Value) { sliderUi.AddOnChangeAction(OnUpdate); } } catch (Exception e) { Debug.LogError(e); } }
public void SetGridValue(Point point, char value, EditMode mode) { if (!gridCellValues.ContainsKey(value)) { SetGridValue(point, ' ', EditMode.CONSTRUCTION); return; } int2 gridCoord = GetGridCoord(point); switch (mode) { // Reserved for more behaviours case EditMode.EDIT: if (gridCoord.x < wallSize || gridCoord.y < wallSize || gridCoord.x >= cellCount - wallSize || gridCoord.y >= cellCount - wallSize || fixedCells.Contains(gridValues[gridCoord.x + gridCoord.y * cellCount])) { return; } break; } bitmap.DrawCell(this, point, gridCellValues[value].color); gridValues[gridCoord.x + gridCoord.y * cellCount] = value; }
private async Task ValidateAsync(EditMode editMode, CancellationToken cancellationToken = default) { var stopwatch = Context.PerformanceMeasurements.Start(nameof(ValidateAsync)); try { var validationTasks = _validators.Value .Select(v => v.ValidateAsync(Context, cancellationToken)); var validationMessages = (await Task.WhenAll(validationTasks)) .Where(x => x != null) .SelectMany(x => x) .ToList(); if (validationMessages.Count != 0) { throw new DomainValidationException(validationMessages); } } finally { stopwatch.Stop(); } }
public Label ShowDialog(Label label, EditMode mode) { switch (mode) { case EditMode.Add: break; case EditMode.Change: _tbValue.Text = label.ValueString[0]; _tbLabel.Text = label.LabelString; if (string.IsNullOrEmpty(label.ExtraValue)) { _tbEValue.Text = label.ExtraValue; } break; default: break; } base.ShowDialog(); if (IsOK) { if (string.IsNullOrWhiteSpace(_tbEValue.Text)) { return(new Label(" LBL", 1, _tbLabel.Text.Trim().Length, _tbLabel.Text.Trim(), "WRTS", new int[] { _tbValue.Text.Trim().Length }, new string[] { _tbValue.Text.Trim() }, _tbEValue.Text.Trim().Length, _tbEValue.Text.Trim())); } else { return(new Label(" LBL", 1, _tbLabel.Text.Trim().Length, _tbLabel.Text.Trim(), " RTS", new int[] { _tbValue.Text.Trim().Length }, new string[] { _tbValue.Text.Trim() })); } } else { return(label); } }
private void ChangeEditMode(EditMode editMode) { if (CurrentEditMode == editMode) { return; } switch (editMode) { case EditMode.Pencil: _currentEditTool = new PencilEditTool(this); break; case EditMode.Eraser: _currentEditTool = new EraserEditTool(this); break; case EditMode.BrushPicker: break; default: throw new NotSupportedException($"Unsupported editmode \"{editMode}\""); } }
private void SelectedEditMode_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (SelectionRectangle != null) { SelectionRectangle.Visibility = Visibility.Collapsed; } switch (SelectedEditMode.SelectedIndex) { case 0: _editMode = EditMode.Tiles; PointerEditor.Visibility = Visibility.Collapsed; break; case 1: _editMode = EditMode.Objects; PointerEditor.Visibility = Visibility.Collapsed; break; case 2: _editMode = EditMode.Pointers; break; } }
protected virtual void OnSceneGUI() { if (EditMode.editMode == EditMode.SceneViewEditMode.Collider && EditMode.IsOwner(this)) { OcclusionPortal occlusionPortal = base.target as OcclusionPortal; SerializedObject serializedObject = new SerializedObject(occlusionPortal); serializedObject.Update(); using (new Handles.DrawingScope(occlusionPortal.transform.localToWorldMatrix)) { SerializedProperty serializedProperty = serializedObject.FindProperty(this.m_Center.propertyPath); SerializedProperty serializedProperty2 = serializedObject.FindProperty(this.m_Size.propertyPath); this.m_BoundsHandle.center = serializedProperty.vector3Value; this.m_BoundsHandle.size = serializedProperty2.vector3Value; EditorGUI.BeginChangeCheck(); this.m_BoundsHandle.DrawHandle(); if (EditorGUI.EndChangeCheck()) { serializedProperty.vector3Value = this.m_BoundsHandle.center; serializedProperty2.vector3Value = this.m_BoundsHandle.size; serializedObject.ApplyModifiedProperties(); } } } }