#pragma warning restore 0169 #pragma warning restore 0649 public ViewTaskDialog(Window parent, bool isTaskInit) { Stream stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("ViewTaskDialog.glade"); Glade.XML glade = new Glade.XML(stream, "ViewTaskDialog", null); stream.Close(); glade.Autoconnect(this); thisDialog = ((Dialog)(glade.GetWidget("ViewTaskDialog"))); thisDialog.Modal = true; thisDialog.TransientFor = parent; thisDialog.WindowPosition = WindowPosition.CenterAlways; cbActor.Entry.IsEditable = false; cbActor.Changed += new EventHandler(OnCbActorChanged); calStartTime.Date = DateTime.Now.Date; calEndTime.Date = DateTime.Now.Date; cbState.Entry.IsEditable = false; cbState.Changed += new EventHandler(OnCbStateChanged); spbPriority.SetRange(0, 10000); spbPriority.SetIncrements(1, 10); IsInitTask = isTaskInit; tvDescription.KeyReleaseEvent += HandleKeyReleaseEvent; tvComment.KeyReleaseEvent += CommentKeyReleaseEvent; }
public AdjustTimeDialog(Db db, IBrowsableCollection collection) : base("AdjustTimeDialog.ui", "time_dialog") { this.db = db; this.collection = collection; view = new PhotoImageView(collection); view_scrolled.Add(view); item = view.Item; item.Changed += HandleItemChanged; item.MoveFirst(); tray = new BrowseablePointerGridView(view.Item) { MaxColumns = 1, DisplayRatings = false, DisplayTags = false, DisplayDates = true }; tray_scrolled.Add(tray); //forward_button.Clicked += HandleForwardClicked; //back_button.Clicked += HandleBackClicked; ok_button.Clicked += HandleOkClicked; cancel_button.Clicked += HandleCancelClicked; photo_spin.ValueChanged += HandleSpinChanged; photo_spin.SetIncrements(1.0, 1.0); photo_spin.Adjustment.StepIncrement = 1.0; photo_spin.Wrap = true; date_edit.TimeChanged += HandleTimeChanged; date_edit.DateChanged += HandleTimeChanged; Gtk.Entry entry = (Gtk.Entry)date_edit.Children [0]; entry.Changed += HandleTimeChanged; entry = (Gtk.Entry)date_edit.Children [2]; entry.Changed += HandleTimeChanged; offset_entry.Changed += HandleOffsetChanged; ShowAll(); HandleCollectionChanged(collection); spacing_entry.Changed += HandleSpacingChanged; spacing_entry.Sensitive = !difference_check.Active; difference_check.Toggled += HandleActionToggled; }
private void CellSizeSpin_Changed(object sender, EventArgs args) { widthSpin.SetIncrements(cellSizeSpin.Value, cellSizeSpin.Value); heightSpin.SetIncrements(cellSizeSpin.Value, cellSizeSpin.Value); }