private void InitDBControls() { DescriptionTextBox.SetDBInfo(DevicesBaseCols.Description, true); AssetTagTextBox.SetDBInfo(DevicesBaseCols.AssetTag, true); SerialTextBox.SetDBInfo(DevicesBaseCols.Serial, true); PurchaseDatePicker.SetDBInfo(DevicesBaseCols.PurchaseDate, true); ReplaceYearTextBox.SetDBInfo(DevicesBaseCols.ReplacementYear, false); LocationComboBox.SetDBInfo(DevicesBaseCols.Location, Attributes.DeviceAttributes.Locations, true); CurrentUserTextBox.SetDBInfo(DevicesBaseCols.CurrentUser, true); OSTypeComboBox.SetDBInfo(DevicesBaseCols.OSVersion, Attributes.DeviceAttributes.OSType, true); PhoneNumTextBox.SetDBInfo(DevicesBaseCols.PhoneNumber, false); EquipTypeComboBox.SetDBInfo(DevicesBaseCols.EQType, Attributes.DeviceAttributes.EquipType, true); StatusComboBox.SetDBInfo(DevicesBaseCols.Status, Attributes.DeviceAttributes.StatusType, true); TrackableCheckBox.SetDBInfo(DevicesBaseCols.Trackable, false); POTextBox.SetDBInfo(DevicesBaseCols.PO, false); HostnameTextBox.SetDBInfo(DevicesBaseCols.HostName, false); iCloudTextBox.SetDBInfo(DevicesBaseCols.iCloudAccount, false); }
private void InitDBControls() { //Required Fields AssetTagTextBox.SetDBInfo(DevicesBaseCols.AssetTag, true); SerialTextBox.SetDBInfo(DevicesBaseCols.Serial, true); CurrentUserTextBox.SetDBInfo(DevicesBaseCols.CurrentUser, true); DescriptionTextBox.SetDBInfo(DevicesBaseCols.Description, true); PurchaseDatePicker.SetDBInfo(DevicesBaseCols.PurchaseDate, true); EquipTypeComboBox.SetDBInfo(DevicesBaseCols.EQType, Attributes.DeviceAttributes.EquipType, true); LocationComboBox.SetDBInfo(DevicesBaseCols.Location, Attributes.DeviceAttributes.Locations, true); OSVersionComboBox.SetDBInfo(DevicesBaseCols.OSVersion, Attributes.DeviceAttributes.OSType, true); StatusComboBox.SetDBInfo(DevicesBaseCols.Status, Attributes.DeviceAttributes.StatusType, true); //Non-required and Misc Fields PONumberTextBox.SetDBInfo(DevicesBaseCols.PO, false); ReplaceYearTextBox.SetDBInfo(DevicesBaseCols.ReplacementYear, false); PhoneNumberTextBox.SetDBInfo(DevicesBaseCols.PhoneNumber, false); GuidLabel.SetDBInfo(DevicesBaseCols.DeviceGuid, ParseType.DisplayOnly, false); TrackableCheckBox.SetDBInfo(DevicesBaseCols.Trackable, false); HostnameTextBox.SetDBInfo(DevicesBaseCols.HostName, false); iCloudTextBox.SetDBInfo(DevicesBaseCols.iCloudAccount, false); }
void ReleaseDesignerOutlets() { if (AddressBox != null) { AddressBox.Dispose(); AddressBox = null; } if (BPOBox != null) { BPOBox.Dispose(); BPOBox = null; } if (CoBorrowerPopUp != null) { CoBorrowerPopUp.Dispose(); CoBorrowerPopUp = null; } if (CountyBox != null) { CountyBox.Dispose(); CountyBox = null; } if (DefaultRateBox != null) { DefaultRateBox.Dispose(); DefaultRateBox = null; } if (LenderPopUp != null) { LenderPopUp.Dispose(); LenderPopUp = null; } if (LoanRateBox != null) { LoanRateBox.Dispose(); LoanRateBox = null; } if (MonthsToCompletionBox != null) { MonthsToCompletionBox.Dispose(); MonthsToCompletionBox = null; } if (PnLBox != null) { PnLBox.Dispose(); PnLBox = null; } if (PointsBox != null) { PointsBox.Dispose(); PointsBox = null; } if (PurchaseDatePicker != null) { PurchaseDatePicker.Dispose(); PurchaseDatePicker = null; } if (PurchasePriceBox != null) { PurchasePriceBox.Dispose(); PurchasePriceBox = null; } if (RehabCostBox != null) { RehabCostBox.Dispose(); RehabCostBox = null; } if (StateBox != null) { StateBox.Dispose(); StateBox = null; } if (TitleHolderPopUp != null) { TitleHolderPopUp.Dispose(); TitleHolderPopUp = null; } if (TitlePopUp != null) { TitlePopUp.Dispose(); TitlePopUp = null; } if (TownBox != null) { TownBox.Dispose(); TownBox = null; } if (UpdateMessage != null) { UpdateMessage.Dispose(); UpdateMessage = null; } if (ProfitSplit != null) { ProfitSplit.Dispose(); ProfitSplit = null; } if (ProfitSplitBox != null) { ProfitSplitBox.Dispose(); ProfitSplitBox = null; } if (AcquisitionOnlyCheckBox != null) { AcquisitionOnlyCheckBox.Dispose(); AcquisitionOnlyCheckBox = null; } if (InitialLoanPercentBox != null) { InitialLoanPercentBox.Dispose(); InitialLoanPercentBox = null; } if (FullAcquisitionCostCheckBox != null) { FullAcquisitionCostCheckBox.Dispose(); FullAcquisitionCostCheckBox = null; } }
public ItemEditBox (Items items, UIManager uiManager) : this(new Builder("item_edit_box.ui")) { Items = items; // create image the actions Gtk.Action addImageAction = new Gtk.Action("addImage","Add Image...","",Stock.Open); addImageAction.Activated += OnAddItemImage; Gtk.Action removeImageAction = new Gtk.Action("removeImage","Remove Image","",Stock.Remove); removeImageAction.Activated += OnRemoveItemImage; Gtk.Action imageAction = new Gtk.Action("itemImage","Image"); ActionGroup imageActionGroup = new ActionGroup("itemImage"); imageActionGroup.Add(addImageAction); imageActionGroup.Add(removeImageAction); imageActionGroup.Add(imageAction); uiManager.InsertActionGroup(imageActionGroup,0); // create the tag actions Gtk.Action addTagAction = new Gtk.Action("addTag","Add Tag","",Stock.Add); addTagAction.Activated += OnAddItemTag; Gtk.Action removeTagAction = new Gtk.Action("removeTag","Remove Tag","",Stock.Remove); removeTagAction.Activated += OnRemoveItemTag; Gtk.Action tagAction = new Gtk.Action("itemTag","Tag"); ActionGroup tagActionGroup = new ActionGroup("itemTag"); tagActionGroup.Add(addTagAction); tagActionGroup.Add(removeTagAction); tagActionGroup.Add(tagAction); uiManager.InsertActionGroup(tagActionGroup,0); // add columns to the item type combobox CellRenderer render = new CellRendererText (); itemEditType.PackStart(render, true); itemEditType.AddAttribute(render, "text", 0); // add columns and model to the depreciation combobox render = new CellRendererPixbuf (); itemEditDepreciationMethod.PackStart(render, false); itemEditDepreciationMethod.AddAttribute(render, "pixbuf", 0); render = new CellRendererText (); itemEditDepreciationMethod.PackStart(render, true); itemEditDepreciationMethod.AddAttribute(render, "text", 1); ListStore list = new ListStore(typeof(Gdk.Pixbuf),typeof(string),typeof(DepreciationMethod)); list.AppendValues(new Gdk.Pixbuf(null,"degressive.png"),"Degressive",DepreciationMethod.Degressive); list.AppendValues(new Gdk.Pixbuf(null,"linear.png"),"Linear",DepreciationMethod.Linear); list.AppendValues(new Gdk.Pixbuf(null,"progressive.png"),"Progressive",DepreciationMethod.Progressive); itemEditDepreciationMethod.Model = list; // add columns and model to the label combobox render = new CellRendererPixbuf (); itemEditLabelMethod.PackStart(render, false); itemEditLabelMethod.AddAttribute(render, "pixbuf", 0); render = new CellRendererText (); itemEditLabelMethod.PackStart(render, true); itemEditLabelMethod.AddAttribute(render, "text", 1); list = new ListStore(typeof(Gdk.Pixbuf),typeof(string),typeof(DepreciationMethod)); list.AppendValues(null,"Not Labelable",LabelMethod.None); list.AppendValues(null,"Printed Labels",LabelMethod.Print); list.AppendValues(null,"Painted Labels",LabelMethod.Paint); itemEditLabelMethod.Model = list; purchaseDatePicker = new PurchaseDatePicker(); purchaseDatePicker.DateChanged += OnPickerDateChanged; itemEditShowCalendarIcon.Pixbuf = new Gdk.Pixbuf(null,"calendar.png"); // create the images columns TreeViewColumn col = new TreeViewColumn (); col.Title = "images"; render = new CellRendererToggle (); (render as CellRendererToggle).Toggled += OnMainImageToggle; (render as CellRendererToggle).Radio = true; col.PackStart(render, false); col.AddAttribute(render, "active", 1); render = new CellRendererPixbuf (); col.PackStart (render, false); col.AddAttribute(render, "pixbuf", 2); render = new CellRendererText (); (render as CellRendererText).Editable = true; (render as CellRendererText).Edited += OnItemImageMemoEdited; render.EditingStarted += OnItemImageMemoEditingStarted; col.PackStart (render, true); col.AddAttribute(render, "text", 3); col.AddAttribute(render, "foreground-gdk",4); itemEditImages.AppendColumn(col); itemEditImages.HeadersVisible = false; TargetEntry target = new TargetEntry("text/plain",TargetFlags.OtherApp,0); TargetEntry[] targetArray = new TargetEntry[1]; targetArray[0] = target; itemEditImages.EnableModelDragDest(targetArray, Gdk.DragAction.Copy); itemEditImages.DragDataReceived += OnItemImageDragDataReceived; // create the tags cells render = new CellRendererText (); itemEditTagCell = render; (render as CellRendererText).Editable = true; (render as CellRendererText).Edited += OnItemTagNameEdited; render.EditingStarted += OnStartItemTagEdit; itemEditTags.PackStart (render, false); itemEditTags.AddAttribute(render, "text", 1); // create the tag completion itemTagCompletion = new ItemTagChooser(); itemTagCompletion.MatchFunc = ItemTabCompletionMatch; itemTagCompletion.MinimumKeyLength = 0; itemTagCompletion.PopupSetWidth = false; render = new CellRendererText (); itemTagCompletion.PackStart (render, true); itemTagCompletion.AddAttribute(render, "text", 1); // create the popup menues uiManager.AddUiFromResource("item_edit_box_menues.xml"); itemImagePopup = (Menu) uiManager.GetWidget("/itemImagePopup"); itemTagPopup = (Menu) uiManager.GetWidget("/itemTagPopup"); }
void ReleaseDesignerOutlets() { if (AddressBox != null) { AddressBox.Dispose(); AddressBox = null; } if (TownBox != null) { TownBox.Dispose(); TownBox = null; } if (CountyBox != null) { CountyBox.Dispose(); CountyBox = null; } if (StateBox != null) { StateBox.Dispose(); StateBox = null; } if (PurchaseDatePicker != null) { PurchaseDatePicker.Dispose(); PurchaseDatePicker = null; } if (TitleHolderPopUp != null) { TitleHolderPopUp.Dispose(); TitleHolderPopUp = null; } if (CoBorrowerPopUp != null) { CoBorrowerPopUp.Dispose(); CoBorrowerPopUp = null; } if (PurchasePriceBox != null) { PurchasePriceBox.Dispose(); PurchasePriceBox = null; } if (RehabCostBox != null) { RehabCostBox.Dispose(); RehabCostBox = null; } if (BPOBox != null) { BPOBox.Dispose(); BPOBox = null; } if (PnLBox != null) { PnLBox.Dispose(); PnLBox = null; } if (MonthsToCompletionBox != null) { MonthsToCompletionBox.Dispose(); MonthsToCompletionBox = null; } if (UpdateMessage != null) { UpdateMessage.Dispose(); UpdateMessage = null; } if (LenderPopUp != null) { LenderPopUp.Dispose(); LenderPopUp = null; } if (TitlePopUp != null) { TitlePopUp.Dispose(); TitlePopUp = null; } }