public void Transform(changes color = changes.Rgba64) { BitmapImage LayerBitmapImage = base.toBitmapImage(); format = new FormatConvertedBitmap(); format.BeginInit(); format.Source = LayerBitmapImage; switch (color) { case changes.cmyk32: format.DestinationFormat = PixelFormats.Cmyk32; break; case changes.blackwhite: format.DestinationFormat = PixelFormats.BlackWhite; break; case changes.gray: format.DestinationFormat = PixelFormats.Gray32Float; break; default: format.DestinationFormat = PixelFormats.Rgba64; break; } format.EndInit(); }
private void button1_Click(object sender, EventArgs e) { Regex regex = new Regex("^[А-Яа-я]+$"); if (regex.IsMatch(textBox1.Text)) { changes ch = new changes(); ch.name_group = textBox1.Text; ch.IDs_privgr = "-1"; ch.name_priv = "-1"; ch.name = "-11"; OperationChangesClient operationclient = new OperationChangesClient("BasicHttpBinding_IOperationChanges"); int flag = operationclient.add_group(ch); if (flag == 1) { MessageBox.Show("Операция прошла успешно."); } else { MessageBox.Show("Ошибка! Попробуйте еще раз."); } this.Close(); } else { MessageBox.Show("Некорректный ввод."); } }
private void button2_Click(object sender, EventArgs e) { Regex regex = new Regex("^[А-Яа-я]+$"); if (regex.IsMatch(textBox2.Text)) { changes ch = new changes(); ch.ID_group = Convert.ToInt32(textBox1.Text); ch.name_group = textBox2.Text; try { for (int i = 0; i <= dataGridView1.RowCount - 1; i++) { if (dataGridView1.Rows[i].Cells[2].Value.ToString() == "True") { if (ch.IDs_privgr != null) { ch.IDs_privgr = ch.IDs_privgr + ", " + dataGridView1.Rows[i].Cells[0].Value; } else { ch.IDs_privgr = dataGridView1.Rows[i].Cells[0].Value.ToString(); } } } } catch { } Form2 ad = new Form2(); ch.ID_person = -1; ch.name = "-1"; //admin ad = new admin(); OperationChangesClient operationclient = new OperationChangesClient("BasicHttpBinding_IOperationChanges"); int flag = operationclient.update_groups(ch); if (flag == 1) { MessageBox.Show("Операция прошла успешно."); } else { MessageBox.Show("Ошибка! Попробуйте еще раз."); } } else { MessageBox.Show("Ошибка! Некорректный ввод."); } }
/// <summary> /// Called to queue a change to a prim /// to use in place of old taint mechanism so changes do have a time sequence /// </summary> public void AddChange(AuroraODECharacter character, changes what, Object arg) { AODEchangeitem item = new AODEchangeitem {character = character, what = what, arg = arg}; ChangesQueue.Enqueue(item); }
/// <summary> /// Called to queue a change to a prim /// to use in place of old taint mechanism so changes do have a time sequence /// </summary> public void AddChange(AuroraODEPrim prim, changes what, Object arg) { AODEchangeitem item = new AODEchangeitem {prim = prim, what = what, arg = arg}; ChangesQueue.Enqueue(item); }
/// <summary> /// Called to queue a change to a prim /// to use in place of old taint mechanism so changes do have a time sequence /// </summary> public void AddChange(AuroraODEPrim prim,changes what,Object arg) { AODEchangeitem item = new AODEchangeitem(); item.prim = prim; item.what = what; item.arg = arg; // lock (ChangesQueue) { ChangesQueue.Enqueue(item); } }
/// <summary> /// Called to queue a change to a prim /// to use in place of old taint mechanism so changes do have a time sequence /// </summary> public void AddChange(OdeCharacter character, changes what, Object arg) { ODEchangeitem item = new ODEchangeitem(); item.character = character; item.what = what; item.arg = arg; ChangesQueue.Enqueue(item); }
public void AddChange(OdePrim prim, changes what, Object arg) { ODEchangeitem item = new ODEchangeitem(); item.prim = prim; item.what = what; item.arg = arg; ChangesQueue.Enqueue(item); }
public void AddChange(changes what, object arg) { _parent_scene.AddChange((PhysicsActor)this, what, arg); }
public bool DoAChange(changes what, object arg) { if (collider == IntPtr.Zero && what != changes.Add && what != changes.Remove) { return false; } // nasty switch switch (what) { case changes.Add: changeAdd(); break; case changes.Remove: changeRemove(); break; case changes.Position: changePosition((Vector3)arg); break; case changes.Orientation: changeOrientation((Quaternion)arg); break; case changes.PosOffset: donullchange(); break; case changes.OriOffset: donullchange(); break; case changes.Velocity: changeVelocity((Vector3)arg); break; // case changes.Acceleration: // changeacceleration((Vector3)arg); // break; // case changes.AngVelocity: // changeangvelocity((Vector3)arg); // break; case changes.Force: changeForce((Vector3)arg); break; case changes.Torque: changeSetTorque((Vector3)arg); break; case changes.AddForce: changeAddForce((Vector3)arg); break; case changes.AddAngForce: changeAddAngularForce((Vector3)arg); break; case changes.AngLock: changeAngularLock((byte)arg); break; case changes.Size: changeSize((Vector3)arg); break; case changes.AvatarSize: changeAvatarSize((strAvatarSize)arg); break; case changes.Momentum: changeMomentum((Vector3)arg); break; case changes.PIDHoverHeight: changePIDHoverHeight((float)arg); break; case changes.PIDHoverType: changePIDHoverType((PIDHoverType)arg); break; case changes.PIDHoverTau: changePIDHoverTau((float)arg); break; case changes.PIDHoverActive: changePIDHoverActive((bool)arg); break; /* not in use for now case changes.Shape: changeShape((PrimitiveBaseShape)arg); break; case changes.CollidesWater: changeFloatOnWater((bool)arg); break; case changes.VolumeDtc: changeVolumedetetion((bool)arg); break; case changes.Physical: changePhysicsStatus((bool)arg); break; case changes.Selected: changeSelectedStatus((bool)arg); break; case changes.disabled: changeDisable((bool)arg); break; case changes.building: changeBuilding((bool)arg); break; */ case changes.Null: donullchange(); break; default: donullchange(); break; } return false; }
public void AddChange(changes what, object arg) { _parent_scene.AddChange(this, what, arg); }
public bool DoAChange(changes what, object arg) { if (prim_geom == IntPtr.Zero && what != changes.Add && what != changes.Remove) { return false; } // nasty switch switch (what) { case changes.Add: changeadd(); break; case changes.Remove: //If its being removed, we don't want to rebuild the physical rep at all, so ignore this stuff... //When we return true, it destroys all of the prims in the linkset anyway if (_parent != null) { OdePrim parent = (OdePrim)_parent; parent.ChildRemove(this,false); } else ChildRemove(this,false); RemoveGeom(); m_targetSpace = IntPtr.Zero; return true; case changes.Link: OdePrim tmp = (OdePrim)arg; changeLink(tmp); break; case changes.DeLink: changeLink(null); break; case changes.Position: changePosition((Vector3)arg); break; case changes.Orientation: changeOrientation((Quaternion)arg); break; case changes.PosOffset: donullchange(); break; case changes.OriOffset: donullchange(); break; case changes.Velocity: changevelocity((Vector3)arg); break; // case changes.Acceleration: // changeacceleration((Vector3)arg); // break; // case changes.AngVelocity: // changeangvelocity((Vector3)arg); // break; case changes.Force: changeForce((Vector3)arg); break; case changes.Torque: changeSetTorque((Vector3)arg); break; case changes.AddForce: changeAddForce((Vector3)arg); break; case changes.AddAngForce: changeAddAngularForce((Vector3)arg); break; case changes.AngLock: changeAngularLock((Vector3)arg); break; case changes.Size: changeSize((Vector3)arg); break; case changes.Shape: changeShape((PrimitiveBaseShape) arg); break; case changes.CollidesWater: changeFloatOnWater((bool)arg); break; case changes.VolumeDtc: changeVolumedetetion((bool)arg); break; case changes.Physical: changePhysicsStatus((bool)arg); break; case changes.Selected: changeSelectedStatus((bool)arg); break; case changes.disabled: changeDisable((bool) arg); break; case changes.building: changeBuilding((bool)arg); break; case changes.Null: donullchange(); break; default: donullchange(); break; } return false; }
/// <summary> /// Called to queue a change to a actor /// to use in place of old taint mechanism so changes do have a time sequence /// </summary> public void AddChange(PhysicsActor actor, changes what, Object arg) { ODEchangeitem item = new ODEchangeitem(); item.actor = actor; item.what = what; item.arg = arg; ChangesQueue.Enqueue(item); }